zoukankan      html  css  js  c++  java
  • SpringBoot通过devtools实现热部署

    1. 在项目的pom.xml文件添加如下两段

    2. <dependency>  

                  <groupId>org.springframework.boot</groupId>  

                  <artifactId>spring-boot-devtools</artifactId>

                  <version>1.5.7.RELEASE</version>

                  <optional>true</optional>  

      </dependency> 

      SpringBoot通过配置devtools实现热部署

    3. <plugin>  

                      <groupId>org.springframework.boot</groupId>  

                      <artifactId>spring-boot-maven-plugin</artifactId>  

                      <configuration>  

                          <fork>true</fork>

                          <addResources>true</addResources>  

                      </configuration>  

      </plugin> 

      SpringBoot通过配置devtools实现热部署

    4. 如果使用的是Intellij IEDA开发工具,还需要到设置里将project automatically勾选上;File->Setting->Build,…->Compiler  将右侧project automatically勾上

      SpringBoot通过配置devtools实现热部署

    5. Intellij IEDA 使用ctrl+shift+a 快捷键搜索Registry,选择搜索出来的第一个

      SpringBoot通过配置devtools实现热部署

    6. 找到compiler.automake.allow.when.app.running,勾上开启此功能即可

      SpringBoot通过配置devtools实现热部署

    7. 7

      此时重新启动项目即可实现热部署,改动任意代码会立即生效,不用再每次重新启动项目

  • 相关阅读:
    js 进度条效果
    js切换背景颜色
    div定时放大缩小
    html图片拖放
    网站滑到指定的位置给div添加动画效果
    播放视频
    git (Linux(Centos)安装及使用教程)
    PHP 预定义常量(魔术常量)
    【POJ3254】Corn Fields
    树形DP初探•总结
  • 原文地址:https://www.cnblogs.com/BoKe-LY/p/11847129.html
Copyright © 2011-2022 走看看