1. 给pom.xml中添加依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
<scope>true</scope>
</dependency>
2. 修改pom.xml中
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
</configuration>
</plugin>
</plugins>
</build>
3. 点开File --> setting --> Build,Execution,Deployment -->Compiler 勾选Build project automatically 第三张图 打开谷歌浏览器,按F12,出来开发者模式,选中Disable cache(while DevTools is open)



来源:CSDN
作者:入行小菜鸟Mr.L
链接:https://blog.csdn.net/weixin_43231884/article/details/103458309