文章详情页
java - spring boot + thymeleaf热插拔无效?
浏览:107日期: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. docker安装后出现Cannot connect to the Docker daemon.2. docker gitlab 如何git clone?3. android - 项目时间长了,字符串文件strings有的字符串可能是多余的,有没有办法快速检测那些是没用的?4. javascript - 怎么看网站用了什么技术框架?5. mysql - 用PHPEXCEL将excel文件导入数据库数据5000+条,本地数据库正常,线上只导入15条,没有报错,哪里的问题?6. java报错Communications link failure 该如何解决?7. 刷新页面出现弹框8. 关于Android权限的获取问题,大家遇到过这样的情况嘛?9. angular.js - angularJs ngRoute怎么在路由传递空字符串及用ng-switch取得10. PC 手机兼容的 编辑器
排行榜
