1、引入spring-boot-devtools
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
2、开启Build project automatically
Setting > Compiler > Build project automatically
3、开启 auto-make
旧版本idea
ctrl + shift + a 或者 Help > Find Action
搜索 Registry... 进入
勾选 compiler.automake.allow.when.app.running
新版本idea
Advanced Settings
> Compiler
> >Allow auto-make to start even if developed application is currently running