1.在子工程pom.xml中添加devtools jar包到需要启动的项目中
1 <dependency>
2 <groupId>org.springframework.boot</groupId>
3 <artifactId>spring-boot-devtools</artifactId>
4 <scope>runtime</scope>
5 <optional>true</optional>
6 </dependency>
7
2.在父工程pom.xml中添加插件
1
2 <build>
3 <plugins>
4 <plugin>
5 <groupId>org.springframework.boot</groupId>
6 <artifactId>spring-boot-maven-plugin</artifactId>
7 <configuration>
8 <fork>true</fork>
9 <addResources>true</addResources>
10 </configuration>
11 </plugin>
12 </plugins>
13 </build>
、3.配置idea
4.配置idea
4.1 通过快捷键 ctrl + shift + alt + / 弹出以下框,选择Registry
4.2 勾线以下2行
5. 重启idea