1.添加依赖jar包即可
<dependency>
<groupId>org.springframework.boot</groupid>
<artifactId>spring-boot-devtools<artifactId>
<scope>runtime<scope>
<optional>true<optional>
<denpendency>
2.添加插件到父类工程pom.xml里面,
<build>
<finalName>工程名字</finalName> #可以不写
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin<artifacId>
<configuration>
<fork>true<fork>
<addResources>true<addResources>
<configuration>
</plugin>
<plugins>
<build>
开启自动编译权限
settings->Compiler->
4.使用快捷键:ctrl+shift+alt+/
弹出registry
点击并勾选:complier.automake.allow.when.app.,running 以及actionSystem.assertFocusAccessFromEdit勾选即可 重启IDEA