1.子工程pom.xml文件加入
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-devtools -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
2.父工程pom.xml加入
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<addResources>true</addResources>
</configuration>
</plugin>
</plugins>
</build>
3.
4.快捷键
激活
4.1 按Ctrl+Alt+Shift+/ 快捷键后,弹出,选择1.Registry...
4.2 勾上如图两个复选框
5.重启idea