美文网首页
Spring Boot 热部署

Spring Boot 热部署

作者: 红紫黑白灰 | 来源:发表于2018-10-22 16:34 被阅读0次

什么是热部署

所谓的热部署:比如项目的热部署,就是在应用程序在不停止的情况下,实现新的部署

实现热部署方法

SpringBoot 采用 devtools 实现热部署

实现步骤

  • 在poml 文件中添加依赖
<!-- spring boot devtools 依赖包 -->   
<dependency>
  <groupId>org.springframework.boot</groupId> 
  <artifactId>spring-boot-devtools</artifactId> 
  <optional>true</optional> 
  <scope>true</scope> 
</dependency>

在bulid节点

<build>
  <plugins> 
    <plugin> 
      <groupId>org.springframework.boot</groupId> 
      <artifactId>spring-boot-maven-plugin</artifactId> 
       <configuration> 
        <fork>true</fork>
       </configuration> 
    </plugin>
  </plugins>
</build>
  • 在IDEA中setting中设置配置


    配置1.png
  • 将以下属性勾选


    配置2.png
  • 重启即可实现

相关文章

网友评论

      本文标题:Spring Boot 热部署

      本文链接:https://www.haomeiwen.com/subject/gfmgzftx.html