1、pom文件添加:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
2、勾选自动编译

3、idea按两次shift,搜索registry,打开registry设置,勾选running选项:
