0
点赞
收藏
分享

微信扫一扫

IDEA配置热部署Devtools(微服务开发必备)


1. 在聚合父类总工程中引入pom

<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>

2. 子工程引入Devtools.jar

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<!--这里version自动引入父工程中指定的版本-->

3. IDEA中开启自动编译的配置

IDEA配置热部署Devtools(微服务开发必备)_intellij-idea

4. 开启热注册

同时按住 Shift + Ctrl + Alt + / ,选择 Registry… 回车,勾选

IDEA配置热部署Devtools(微服务开发必备)_微服务_02


点击 Close。

5. 重启IDEA,运行测试


举报

相关推荐

0 条评论