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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM