承接上文
(4)在templates文或者件夹下编写index.html等文件
具体代码:

springboot -thymeleaf 使用案例详细总结(2)

(5)配置application.yml:
spring:
thymeleaf:
cache: false
prefix: classpath:/templates/
suffix: .html
encoding: UTF-8
mode: HTML5
(6)访问:http://localhost:8080/index
springboot -thymeleaf 使用案例详细总结(2)
效果图:
springboot -thymeleaf 使用案例详细总结(2)

相关文章: