1.在pom中添加依賴
org.springframework.boot
spring-boot-devtools
true
2.更改idea配置
File-->setting-->Build.Execution,Deployment-->Compiler -->打勾Build project automatically
快捷鍵ctrl+shift+alt+/? --->? registry? --> 打勾complier.automake.allow.when.app.running
nice