idea中spring boot 配置热部署 无效

pom.xml中添加了热部署

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<version>2.0.2.RELEASE</version>
<optional>true</optional>
</dependency>

application-dev.yml文件添加了
thymeleaf:
cache: false #禁止启用缓存

pom.xml

<configuration>
<fork>true</fork>
<addResources>true</addResources>
</configuration>

但是热部署无效

问题解决

需要修改idea中的两个配置
1.setting –> compiler
将 Build project automatically 勾选上

2.alt + shift + a 搜索 registry 选第一个,弹出框后下拉找到 compiler.automake.allow.when.app.running 勾选上即可。
或者
alt + shift+ctrl+/

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容