• SpringBoot热部署配置


    1.引入依赖

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

    2.添加插件

    <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>

    3.yml中开启热部署配置

    spring:
      devtools:
        restart:
          enabled: true  #开启热部署

    4.idea中开启自动编译

    勾选Build project automatically配置

    File > Settings > build > Compiler > Build project automatically

    使用  Ctrl + Shift + Alt + /  调出如下面板,选择Registry

     勾选下面这个选项

    至此配置完成,启动项目后修改代码后代码也会自动加载,无需手动去重启

    热部署会导致类型强制转换的时候报错:https://cloud.tencent.com/developer/article/1497438

    安装JRebel并激活

    https://blog.csdn.net/lianghecai52171314/article/details/105637251

    http://www.yq1012.com/things/5019.html

    梦 想 不 大 , 道 路 很 长 , 开 始 了 就 别 停 下
  • 相关阅读:
    CControlLayer
    CBiontCache
    CHero
    CWidgetMgr---cpp
    CWidgetMgr---H
    CXAnimation类
    CXAnimation.h动画类
    CXCommon.h工具类
    【leetcode】441. Arranging Coins
    【linux基础】关于ARM板子使用O3编译选项优化
  • 原文地址:https://www.cnblogs.com/chengzhongyi/p/14266229.html
Copyright © 2020-2023  润新知