jorgedirkx / thelab_thymeleaf Goto Github PK
View Code? Open in Web Editor NEWBasic setup SpringBoot, Thymeleaf and Testing
Basic setup SpringBoot, Thymeleaf and Testing
SpringBoot and Thymeleaf basic setup: 1. Maven project with dependencies 2. Developer Tools: This spring-boot-devtools helps to disable the caches and enable hot swapping so that developers will always see the last changes. Good for development. Read this โ Spring Boot โ Developer tools Try to modify the Thymeleaf templates or properties files, refresh the browser to see the changes take effect immediately. <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> </dependency> 3. Controller 4. Main app: @SpringBootApplication 5. Thymeleaf + Static files https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-spring-mvc-static-content 5.1 For Thymeleaf template files, put in src/main/resources/templates/ src/main/resources/templates/welcome.html 5.2 Spring Boot common application properties src/main/resources/application.properties welcome.message: xxxxxxx spring.thymeleaf.cache=false 5.3 For Static files like CSS or JS, put in src/main/resources/static/ src/main/resources/static/css/main.css 6. Unit Test MockMvc to test the Spring MVC controller. 7. Demo URL = http://localhost:8080 URL = http://localhost:8080/hello?name=abc 8. Create an executable JAR For deployment, just normal Maven package to create an executable JAR file. $ mvn clean package $ java -jar target\web-thymeleaf-1.0.jar
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.