idea热部署插件-JRebel,安装使用

JRebel很强大,完全不用重启服务器,开发后端和前端一样。
包括 添加类,方法,注解,修改xml和properies文件。

1.下载idea插件,zip格式
jr-ide-intellij-7.0.12_13-17
2.本地安装,然后重启

idea热部署插件-JRebel,安装使用_第1张图片
image.png

3.激活,需要facebook帐号,下面是具体方法
方法

4.配置
安装完成后,简单的配置就可以使用Jrebel的强大功能。
在IntelliJ左下角,选择JRebel选项卡,将需要热加载的模块选中即可。

如果某个模块没有target目录,不要选,比如项目根目录。
这时会在选中的模块下自动生成rebel.xml,记得在.gitignore中忽略。

# JRebel
rebel.xml
idea热部署插件-JRebel,安装使用_第2张图片

如果是web项目,则需要在Run -> Edit Configurations 的服务器,比如tomcat中,
设置On ‘Update action’ 和 On firame deactivation。

5.使用
点击idea图标启动tomcat

idea热部署插件-JRebel,安装使用_第3张图片
image.png

如果改了配置文件,比如xml,properties文件,要点击如下图标更新,不是重启,
或者用菜单run->update xxx application,或者菜单上显示的快捷键。

idea热部署插件-JRebel,安装使用_第4张图片
image.png
idea热部署插件-JRebel,安装使用_第5张图片
image.png

6.如果是纯后台应用,无tomcat .要注册action

  1. help->find action->registry
  2. 选中自动编译 compiler.automake.allow.when.app.running
  3. compiler中选中 build project auto 和 compile independent

你可能感兴趣的:(idea热部署插件-JRebel,安装使用)