1.启用devtools插件
2.勾选Build==》compiler==》build project autoautomaticacally
3.快捷键shift+ctrl+alt+/ 勾选 compiler.automake.allow.when.app.running
4.在springboot插件配置
<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <fork>true</fork> </configuration> </plugin> </plugins> </build>