- pom.xml文件中添加依赖(子工程pom.xml)
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
- pom.xml中添加插件(父工程pom.xml)
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
<addResources>true</addResources>
</configuration>
</plugin>
</plugins>
</build>
-
开启自动编译
-
使用快捷键弹出maintenance
mac快捷键如下:
window快捷键为: ctrl + shift + alt + / -
点击registry并勾选如下:
-
重启idea