• SpringBoot真热部署不重启项目秒改sql已经爽了好几天了


    1.准备工作

      idea插件市场安装如下插件

      

    2.如果安装后重启报错,在报错路径删除就行。

    3.激活jrebel

      激活码获取地址:https://www.guidgen.com/

      服务器地址: https://jrebel.qekang.com/{GUID}

      

       激活成功

      

     4.配置Springboot devtool,缺一不可

    <!--SpringBoot热部署配置 --><br><dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-devtools</artifactId>
        <scope>runtime</scope>
        <optional>true</optional>
    </dependency>
    <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>
    spring:
      devtools:
        restart:
          enabled: true

    5.配置idea

    首先ctrl+alt+s打开设置(Other Settings 的设置是对整个工作空间项目都启作用,而Settings…的设置是对整个项目启作用),搜索Compliler,勾选Build project automatically,如下图所示:

     .按住ctrl + shift + alt + /,出现如下图所示界面,点击Registry...,如下图:

    点击进入后,勾选compiler.automake.allow.when.app.running后关闭即可

     

     6.配置构建快捷键,我配置的鼠标滚轮,也就是需要构建的时候按一下鼠标滚轮就可以自动构建

      

     7.配置Springboot dashbord

     效果如下

     8.配置完毕,只需要润 with jrebel,更改代码后按鼠标滚轮即可实现秒更新

      

     9.我这sql是用注解形式写的,xml形式没有试过是否可以全局热更新。

  • 相关阅读:
    Linux基础操作
    MySQL基础常用指令
    String什么时候创建一个新对象?
    HashMap源码浅析
    LinkList源码浅析
    ArrayList源码浅析
    如何解决syntax error near unexpected token `fi'
    如何解决The request sent by the client was syntactically incorrect.
    Caused by: java.lang.IllegalArgumentException: Invalid <url-pattern> ajaxTest in servlet mapping
    CLUSTER cluster is down,redis报错
  • 原文地址:https://www.cnblogs.com/xyzxy/p/14870766.html
Copyright © 2020-2023  润新知