anonymityning

当我们在使用SpringCloud搭建项目的时候,会有多个项目,每次修改东西的时候,都需要重新启动项目,这样的操作就比较繁琐。

为了提高工作的效率,避免每次频繁的重启项目,在子类pom文件中,我们可以引入devtools的maven依赖

 <!--热部署-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <scope>runtime</scope>
            <optional>true</optional>
        </dependency>

在引入该依赖 之后还需要在父类pom文件中添加maven的plugins

 <plugins>
      <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
        <version>2.2.2.RELEASE</version>
        <configuration>
          <fork>true</fork>
          <addResources>true</addResources>
        </configuration>
      </plugin>
    </plugins>

将ADBC四个选项勾选上,使得本地项目能够自动编译。

最后在本项目上使用Ctrl+Shift+Alt+/

将项目的热部署配置上

 

分类:

技术点:

相关文章:

  • 2022-01-01
  • 2019-09-17
  • 2021-11-22
  • 2021-09-30
  • 2021-04-15
  • 2021-05-08
猜你喜欢
  • 2021-07-14
  • 2020-07-07
  • 2021-10-07
  • 2021-11-19
  • 2021-12-21
  • 2021-07-23
  • 2021-07-12
相关资源
相似解决方案