来源:https://www.cnblogs.com/c2g5201314/p/13063510.html
- 导入依赖包
<!-- 热修改前端-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional> <!-- 这个需要为 true 热部署才有效 -->
</dependency>
- 操作步骤 : File >> Settings >>Build, Execution, Deployment >> Compiler ,
勾上“”Build project automatically"这个选框,保存
-
按住ctrl + alt+ shift + /, 选择第一个Registry
-
6. 部分浏览器需要关闭浏览器的缓存,才能及时刷新前端页面
关闭浏览器的缓存文件功能,我是使用谷歌的chome
那么就把disable cache勾选 ,其他浏览器也需要关闭的,这里就不展示。
关闭浏览器的缓存文件功能,我是使用谷歌的chome
那么就把disable cache勾选 ,其他浏览器也需要关闭的,这里就不展示。
该方式仅能修改热更新前端 ,如 js,jsp,html.css等.
java后端部分无法热更新,需要插件Jrebel才可以