+-
spring boot 下 thymeleaf 配置

thymeleaf 配置参数

关闭thymeleaf缓存 开发时使用 否则没有实时画面
spring.thymeleaf.cache=false 
检查模板是否存在,然后再呈现
spring.thymeleaf.check-template-location=true
Content-Type值
spring.thymeleaf.content-type=text/html
启用MVC Thymeleaf视图分辨率
spring.thymeleaf.enabled=true
应该从解决方案中排除的视图名称的逗号分隔列表
spring.thymeleaf.excluded-view-names=
模板编码
spring.thymeleaf.mode=LEGACYHTML5
预先查看名称的前缀
spring.thymeleaf.prefix=classpath:/templates/
附加查看名称的后缀.
spring.thymeleaf.suffix=.html
中模板解析器的顺序
spring.thymeleaf.template-resolver-order=

名称的逗号分隔列表
spring.thymeleaf.view-names=
结尾一定要有 #thymeleaf end 否则掉坑
 thymeleaf end