一:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
</dependency>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<addResources>true</addResources>
<fork>true</fork>
</configuration>
</plugin>
二 :
三 :
快捷键 ctrl+shift+a 搜索 Registry
然后找到compiler.automake.allow.when.app.running,勾上开启此功能即可