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+/

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

推薦閱讀更多精彩內(nèi)容