1、引入热部署依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
2、设置idea自动编译
3、指定idea工具在运行过程中自动编译
ctrl+shift+alt+/ -> registry->compiler.automake.allow.when.app.running √
搞定!快去试试吧~