1.导入依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
<scope>true</scope>
</dependency>
2.更改配置
File-Settings-Compiler-Build Project automatically
ctrl + shift + alt + / ,选择Registry,勾上 Compiler autoMake allow when app running