1、pom添加spring-boot-devtools依赖和配置编译插件
<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>
</plugin>
2、配置IDEA
Shift+Ctrl+Alt+/,选择Registry, 找到该选项,打勾