1 打开idea,用快捷键Ctrl+shift+A.搜索make project automatically.选中,显示相应的设置,勾选红色箭头的选项
2 在Ctrl+Shift+A,搜索registry,找到并勾选compiler.automake.allow.when.app.running
3关闭idea,然后再启动
4.添加spring boot的热部署依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
5开启热部署
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
</configuration>
</plugin>
</plugins>
</build>
6 谷歌浏览器禁用缓存
F12---->network--->勾选disable catche