1.加依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
2.IDEA配置
1)勾选自动构建
2)注册
- IDEA版本低于2021版时,ctrl + shift + alt + / ,选择Registry,勾上 Compiler autoMake allow when app running
- IDEA版本达到2021版时,使用高级设置,如下图所示: