IDEA配置JRebel实现热部署的方法

软件发布|下载排行|最新软件

当前位置:首页IT学院IT技术

IDEA配置JRebel实现热部署的方法

MrOldx   2021-01-14 我要评论
这篇文章主要介绍了IDEA配置JRebel实现热部署的方法,本文给大家介绍的非常想详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下

1.下载JRebel and XRebel for Intellij插件

2. 激活


请查看这个文章http://www.cicoding.cn/other/jrebel-activation/
激活后
开始配置自动编译

3.勾选Build project automatically

ctrl + shift + alt + / ,选择Registry,勾上 Compiler autoMake allow when app running

4.Edit Configurations

on update action和 on frame deactivation改成 update classes and resources

5.打开JRebel tool

6.勾选你要热部署的应用

查看JRebel日志

使用JRebel启动springboot项目

查看控制台日志

常见错误

jrebel.jar不兼容

JRebel-JVMTI [ERROR] You're using an incompatible 'jrebel.jar' with the JRebel Agent.
JRebel-JVMTI [FATAL] Please make sure that'C:\Users\XXX\AppData\Roaming\JetBrains\IntelliJIdea2020.2\plugins\jr-ide-idea\lib\jrebel6\jrebel.jar' is a copy of lib JRebel ZIP release \Jrebel.jar.

这可能是因为你的IDEA可能不是最新版本,但jrebel的jar包为最新版导致的,

因此请转到官方网站下载你指定IDEA版本的JRebel压缩包。然后解压缩压缩包以找到jrebel.jar,并将jrebel使用的jar包的路径更改为解压缩后的jrebel.jar的文件路径。

再次使用JRebel启动SpringBoot项目并成功启动。如果修改代码,将鼠标点向IDEA窗口以外的区域会自动build(或者手动按ctrl+shfit+F9)


MrBird nb

Copyright 2022 版权所有 软件发布 访问手机版

声明:所有软件和文章来自软件开发商或者作者 如有异议 请与本站联系 联系我们