1、打开设置 --> 查找 build project automatically --> 选中
2、打开设置 --> 查找Registry --> 找到并勾选compiler.automake.allow.when.app.running
最后重启idea
使用 spring-boot 热部署功能
1、在 pom.xml 里添加spring-boot-devtools 依赖
org.springframework.boot
spring-boot-devtools
true
2、开启热部署
在 pom.xml 最后一个 标签之前插入如下代码
org.springframework.boot
spring-boot-maven-plugin
true
3、application.properties 里添加
spring.devtools.restart.enabled=true