承接上文
(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)

相关文章:

  • 2021-12-29
  • 2021-12-15
  • 2021-11-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-04
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-22
  • 2022-12-23
相关资源
相似解决方案