每次在修改thymeleaf的templates之後就要重啟spring boot,雖然spring boot的啟動速度不錯,但是這樣還是很麻煩。 Google了利用spring-boot-devtools
可以實現熱插拔。
我的pom.xml
加入了:
org.springframework.boot spring-boot-devtools 1.3.0.RELEASE true
但是這樣還是沒有效果,但我使用mvn spring-boot:run
啟動後,在修改thymeleaf的templates之後,必須重新啟動才能更新templates。同時我在intellij-idea
中已經設定Build project automatically。
請問熱插拔無效的原因是什麼?
有可能是thymeleaf的快取, 設定
spring.thymeleaf.cache=false