修改java类或者页面静态文件不需要手动重启(适合本地开发环境)
原理:类加载器
<!-- Springboot热部署配置 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
首先进入 File --> Build,Execution,Deployment --> Compiler--> 勾上 Build project automatically 。如下图:
然后使用组合键 “ Shift+Ctrl+Alt+/ ” ,选择 “Registry” ,选中 “ compiler.automake.allow.when. app.running ” 打钩即可
原文:https://www.cnblogs.com/jiehao-yu/p/14640559.html