第一步:添加依赖
说明:一下配置只支持spring-boot项目。
1.导入依赖包
使用spring-boot-devtools提供的开发者工具
spring-boot项目中的pom文件中引入如下依赖
org.springframework.boot spring-boot-devtools
2、IDEA开启项目自动编译,进入设置(ctrl+alt+s)—Build,Execution,Deployment> Compiler 勾选中左侧的Build Project automatically。
3、IDEA开启项目运行时自动make, ctrl + shift + alt+/ 命令:registry -> 勾选.