springboot学习 two 热部署

devtool热部署

  • 添加依赖
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-devtools -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
  • 添加插件至父工程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>
  • 设置允许自动生成

 

  • 更新idea值

  • 重启idea
posted @ 2020-12-02 10:19  k-java  阅读(78)  评论(0编辑  收藏  举报