文章详情页
java - spring boot + thymeleaf热插拔无效?
浏览:86日期:2023-12-16 11:18:56
问题描述
每次在修改thymeleaf的templates之后就要重启spring boot,虽然spring boot的启动速度不错,但是这样还是很麻烦。Google了利用spring-boot-devtools可以实现热插拔。
我的pom.xml加入了:
<!-- hot swap --><dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <version>1.3.0.RELEASE</version> <optional>true</optional></dependency>
但是这样依然没有效果,但我使用mvn spring-boot:run启动后,在修改thymeleaf的templates之后,必须要重启才能更新templates。同时我在intellij-idea中已经设置Build project automatically。
请问热插拔无效的原因是什么?
问题解答
回答1:有可能是thymeleaf的缓存, 设置spring.thymeleaf.cache=false
标签:
java
相关文章:
1. javascript - 文件改后缀后怎么获得原来是什么类型的2. java - Tomcat 不同的域名访问同一个项目的不同网页3. dockerfile - [docker build image失败- npm install]4. python - pandas按照列A和列B分组,将列C求平均数,怎样才能生成一个列A,B,C的dataframe5. css3 - [CSS] 动画效果 3D翻转bug6. docker gitlab 如何git clone?7. docker安装后出现Cannot connect to the Docker daemon.8. 使用mysql自增主键遇到的问题9. docker-machine添加一个已有的docker主机问题10. docker不显示端口映射呢?
排行榜
