spring boot 使用thymeleaf3.0以及thymeleaf的热部署

spring boot 截止1.5.4,默认使用thymeleaf2.0,会有一些很蛋疼的地方比如xml格式之类的,具体哪些就不说了

 -> 替换为3.0版本  

pom中加入

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<!-- set thymeleaf version -->
<thymeleaf.version>3.0.0.RELEASE</thymeleaf.version>
<thymeleaf-layout-dialect.version>2.0.0</thymeleaf-layout-dialect.version>
</properties>


thymeleaf热部署问题
  很简单:
1.配置文件中加上 spring.thymeleaf.cache=false
2.如果你用的是idea,那么编辑完html后使用ctrl + shift + F9 rebuild module一下就行了,其他的编辑器我就不知道了,还是推荐用IDEA

原文地址:https://www.cnblogs.com/huhuixin/p/7232236.html