1、点击: file ,Settings ,Build ,Execution,Deplment,compiler
然后记得apply,ok。
2、组合键:Shift+ALT+Ctrl+/ ,选择“Registry”,找到“complier.automake.allow.when.app.running”
点击Close
3、在pom.xml中添加依赖
dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
4、在applcation.properties中添加
# 热部署开关,false即不启用热部署;
spring.devtools.restart.enabled: true
OK!试一试,不行的话回复一下谢谢