- pom.xml
<!--热部署-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
</configuration>
</plugin>
</plugins>
</build>
- application.properties
debug=true
spring.devtools.restart.enabled=true
- Settings设置,勾选Build project automatically
- Ctrl+Shift+A,搜索Registry,并选中compiler.automake.allow.when.app.running打勾