首先,热部署只允许在开发测试阶段使用
1、加入依赖(子工程)
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
2、在父工程的pom文件build标签中加入
<finalName>父工程名</finalName>
3、在settings里的(build,Execution,Deployment)->compiler将右边的两个未选的打钩
4、在idea中ctrl+shift+alt+/,然后选择Registry,将这两个打钩,然后点击close
5、重启idea生效