Spring Boot热部署

Laughing
2019-07-28 / 0 评论 / 1,415 阅读 / 搜一下 / 正在检测是否收录...

但当服务功能一多,启动速度缓慢时,还是配置个热部署比较方便。在SpringBoot中,只需要加入一个spring-boot-devtools即可。

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

若不生效,可试着在打包工具spring-boot-maven-plugin下的configuration加入true看看,具体配置项如下:

<build>  
       <plugins>  
           <plugin>  
               <groupId>org.springframework.boot</groupId>  
               <artifactId>spring-boot-maven-plugin</artifactId>  
               <configuration>  
                   <fork>true</fork>  
               </configuration>  
           </plugin>  
       </plugins>  
   </build>  
0

评论 (0)

取消
  1. 头像
    青云
    Windows 10 · Google Chrome

    支持一下

    回复
  2. 头像
    Berita Unik Dan Menarik
    Windows 7 · Google Chrome

    Oracle跟踪Sql语句_木子网

    回复