1、加maven依賴
<!--熱部署-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
<scope>true</scope>
</dependency>
2、開啟熱部署
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
</configuration>
</plugin>
3隘梨、開啟idea自動(dòng)make功能
CTRL + SHIFT + A --> 查找make project automatically --> 選中
CTRL + SHIFT + A --> 查找Registry --> 找到并勾選compiler.automake.allow.when.app.running