关于springboot: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

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理