zoukankan      html  css  js  c++  java
  • idea 安装热部署插件

     jrebel(http://zeroturnaround.com/)的作用就是当你的代码改变时,你不需要重启服务,节省了时间。代码的改变有很多种,比如增加class、在class中增加方法等等。下面介绍一下 java 开发利器 intellij idea 怎样安装 jrebel。

    1.安装 jrebel 插件

        在 intellij idea 中,打开 File - Settings(ctrl + alt + s),点击弹出的对话框中的 plugins。 
     
     
        点击对话框底部中间的按钮 Browse repositories...,在弹出的对话框中可以搜索你需要的插件。我们搜索 jrebel。
     
        搜索后,会显示两个 jrebel 的插件。我们安装 JRebel for Intellij,选中此插件,对话框右边有个绿色的 install plugin 按钮。点击安装即可。 安装完成之后,需要重启 intellij idea。
     
        安装好后,在 intellij idea 的右上角,有两个 jrebel 的图标。一个是正常启动模式,一个是 debug 模式。
     

    2.破解 jrebel

        jrebel唯一不好的地方就是收费的大笑。对于我等屌丝的话,只能默默破解了。我现在jrebel使用的版本是6.2.5。点击这里,下载jrebel破解版。解压破解文件后,将
            jrebel.lic 复制到 C:Users你的用户名.jrebel 下
            jrebel.jar 复制到 C:Users你的用户名.IntelliJIdea14configpluginsjr-ide-idealibjrebel 下
        
        打开 intellij idea(如果破解的时候,你的 intellij idea 是打开的,则需要重启),点击 File - Settings(ctrl + alt + s),点击 弹出对话框的 JRebel。右边的 License 显示 VALID,表示破解成功。恭喜!
     

    3.使用 JRebel

        打开 intellij idea 左下角的 JRebel 选项卡,这里可以看到你的项目。如果你的项目想使用jrebel,勾选项目下的复选框即可。
     
        设置 tomcat 选项,点击 intellij idea 右上角。
     
        在 弹出的对话框 中,修改 红色框的内容,保存即可。
     
        点击  中的一个,启动服务吧。
     
        服务启动后,当你修改一个class 后,控制台 显示  JRebel: Reloading class ...,说明 jrebel 已经发挥作用了。
     
     
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------
    2015-10-20 更新
     
    如果修改了 class,jrebel 没有自动部署。那就设置一下 代码编译 后的输出目录。
    1.打开 项目结构(ctrl + shfit + alt + s) 对话框,修改 class 的输出目录到 web 的 classes 下。
     
    2.生成 jrebel 配置文件。在项目上右键 - jrebel - jrebel.xml。
     
    3.重启服务即可。

     转自:https://www.cnblogs.com/a8457013/p/7866579.html

  • 相关阅读:
    一篇文章让你搞懂原型和原型链
    数据库命令
    python序列(十)字典
    华为路由器基础知识和命令
    python列表(九)元组
    python初学者-计算小于100的最大素数
    python初学者-计算1-99奇数的和
    python初学者-使用for循环用四位数组成不同的数
    python初学者-使用for循环做一个九九乘法表
    python初学者-使用if条件语句判断成绩等级
  • 原文地址:https://www.cnblogs.com/javalinux/p/14942358.html
Copyright © 2011-2022 走看看