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中的兩個(gè)配置
1.setting –> compiler
將 Build project automatically 勾選上
2.alt + shift + a 搜索 registry 選第一個(gè)质欲,彈出框后下拉找到 compiler.automake.allow.when.app.running 勾選上即可佳魔。
或者
alt + shift+ctrl+/