33- Inserting String "Hello world" from java into thymeleaf template
Create a String "Hello World" in java and insert into the required position on Thymeleaf Template to generate new HTML page.
1- Creating a String in Java controller class and using model attribute
thymeleaf-springboot-tutorial --> src/main/java --> net.javaguides.springboot --> HelloWorldContoller.java
2- Thymeleaf template (helloworld.html)
NOTE : In order to make your html document into thymeleaf template use xmlns:th="//www.thymeleaf.org"
thymeleaf-springboot-tutorial --> src/main/resources --> templates --> helloworld.html
Image 1 - Showing Thymeleaf Engine working Screenshots
Image 2 - Final Result
Comments
Post a Comment