Springboot中Thymeleaf配置

1.application.properties中配置

#thymelea模板配置
spring.thymeleaf.prefix=classpath:/resources/
spring.thymeleaf.suffix=.html
spring.thymeleaf.mode=HTML5
spring.thymeleaf.encoding=UTF-8
#热部署文件,页面不产生缓存,及时更新
spring.thymeleaf.cache=false
spring.resources.chain.strategy.content.enabled=true
spring.resources.chain.strategy.content.paths=/**

版权声明:本文为liurui50原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。