1.File -> Settings -> Default Settings -> Build -> Compiler 然后勾选 Build project automatically 。
2.同时按住 Ctrl + Shift + Alt + / 选择Registry
3.pom文件添加依赖
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> </dependency>
4.重启idea