IDEA热部署Devtools

  1. 在子工程的 pom 文件中导入Devtools的坐标
<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-devtools</artifactId>
	<scope>runtime</scope>
	<optional>true</optional>
</dependency>
  1. 在父工程的 pom 文件中导入插件坐标
<build>
    <pluginManagement>
        <!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
      <plugins>
        <!--热部署-->
          <plugin>
              <groupId>org.springframework.boot</groupId>
              <artifactId>spring-boot-maven-plugin</artifactId>
              <configuration>
                  <fork>true</fork>
                  <addResources>true</addResources>
              </configuration>
          </plugin>
      </plugins>
    </pluginManagement>
  </build>
  1. 设置IDEA
    在这里插入图片描述
  2. 在父工程的 pom 文件中进行配置

输入Ctrl + Shift + Alt + / 并选择 Registory
在这里插入图片描述
5. 勾选寄存器配置
在这里插入图片描述
6. 重启IDEA即可

猜你喜欢

转载自blog.csdn.net/qq_44796093/article/details/114645220