开启热部署

146 阅读1分钟

首先,热部署只允许在开发测试阶段使用
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将右边的两个未选的打钩Snipaste_2022-02-09_01-21-14.png
4、在idea中ctrl+shift+alt+/,然后选择Registry,将这两个打钩,然后点击close

2.png
5、重启idea生效