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>
配置文件修改:
spring:
devtools:
restart:
enabled: true
additional-paths: src/main/java
poll-interval: 3000
quiet-period: 1000
idea Setting修改
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/908c761345dc2d0b344a18eaf86e62de.png)
idea registry修改(ctrl+shift+alt+/)
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/114af42a0848c7011e7d6f567ca464a4.png)