1.添加依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork><!-- 设置为true-->
</configuration>
</plugin>
2.ctrl + shift + A --> 查找Registry,找到compiler.automake.allow.when.app.running,打钩
3.最后
完成
--------另附源码-----------
https://github.com/email95/SpringBootHotswap.git