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自动make功能
CTRL + SHIFT + A --> 查找make project automatically --> 选中
CTRL + SHIFT + A --> 查找Registry --> 找到并勾选compiler.automake.allow.when.app.running