Giter Site home page Giter Site logo

kennycaiguo / spring-boot-thymeleaf-vuejs-sample Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nkb84/spring-boot-thymeleaf-vuejs-sample

0.0 0.0 0.0 293 KB

A sample of combination between spring boot thymeleaf with vue multiple pages

Shell 25.70% Batchfile 18.23% Java 10.38% HTML 12.15% JavaScript 23.51% Vue 10.03%

spring-boot-thymeleaf-vuejs-sample's Introduction

spring-boot-thymeleaf-vues-sample

This is an sample of how to combined:

  • Server: spring boot + thymeleaf
  • Client: vuejs + multiple pages

In this sample, we use source code from string guides and generate a new vue project from vue-multiple-pages template.

How to use

Server side

  • Static resources are put at src/main/webapp
  • Thymeleaf templates are put at src/main/resources/templates

Client side

  • Install dependencies
npm install
  • Create a new page

    • Create a new folder (can have multiple level) in src/pages folder
    • New folder includes: app.html, app.js and App.vue
    • Add a new route file for new page, and change the required router in app.js
    • app.html can contains thymeleaf tags
  • Build for production with minification, the output is dist folder

npm run build
  • With the page use thymeleaf, copy that html file to server at src/main/resources/templates/
  • With the normal pages, copy all remaining files to server at src/main/webapp/

spring-boot-thymeleaf-vuejs-sample's People

Contributors

nkb84 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.