IDEA之Jrebel插件实现springboot热部署

最近在搞springboot前后端分离的项目,用到springboot项目,每次改代码都要重启下很烦,于是寻找可以实现热部署的方法

归纳如下

1.spring-boot-devtools

2.spring-loaded

3.Jrebel(本文重点)

1.在pom中直接引入依赖

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

设置以下两项(第一项如已设置直接设置第二项)
  1) “File” -> “Settings” -> “Build,Execution,Deplyment” -> “Compiler”,选中打勾 “Build project automatically” 。
  2) 组合键:“Shift+Ctrl+Alt+/” ,选择 “Registry” ,选中打勾 “compiler.automake.allow.when.app.running” 。

2.在Plugins中添加依赖

<build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <dependencies>
                    <!-- spring热部署 -->
                    <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>springloaded</artifactId>
                        <version>1.2.6.RELEASE</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>

3.Jrebel
由于我不想在代码中引入热部署内容于是乎就用的这一种
1)idea下载Jrebel插件
在这里插入图片描述
2)重启idea
3) Jrebel是收费的 要下载一个exe文件,首先在github上下载一个exe文件,(用来破解jrebel)https://github.com/ilanyu/ReverseProxy/releases/tag/v1.0
在这里插入图片描述
打开exe文件不要关闭

4)激活
在这里插入图片描述
第一行:http://127.0.0.1:8888/ 后面的一串字母叫GUID,JRebel授权地址有GUID检测
第二行:随意写个邮箱,格式正确即可。

5)然后将JRebel设置为离线模式,可以180天内不用再次激活,如下图
在这里插入图片描述
6)使用
在这里插入图片描述
靠红色框右边的就是debug,到这里就可以使用springboot热部署了

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值