1.在pom中添加依赖
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> </dependency>
2.更改idea配置
File-->setting-->Build.Execution,Deployment-->Compiler -->打勾Build project automatically快捷键ctrl+shift+alt+/ ---> registry --> 打勾complier.automake.allow.when.app.running
转载自:https://www.liangzl.com/get-article-detail-10914.html,如有侵权,联系删除。