Jboot使用jrebel 热更新代码

1、打开IntelliJ IDEA,点击File -> Settings -> Plugins,如下图: 

Jboot使用jrebel 热更新代码

我这里是安装好了的

2、配置IDEA:idea中command+shift+a ,在弹出浮层中输入registry

Jboot使用jrebel 热更新代码

compiler.automake.allow.when.app.running 选中,关闭窗口

4、之后再设置idea为自动编译。

Jboot使用jrebel 热更新代码

5、项目中配置Jrebel:在项目的module右键,弹出菜单最下边JReble。如图:

Jboot使用jrebel 热更新代码

会自动生产rebel.xml 配置文件


6、配置Jrebel 服务器,你项目要用到的端口

Jboot使用jrebel 热更新代码



7、配置项目,这个端口就是jboot.properties 中的  jboot.server.port=28089

Jboot使用jrebel 热更新代码

Jboot使用jrebel 热更新代码



8、启动参数加上  -Drebel.remoting_plugin=true

Jboot使用jrebel 热更新代码


9、以rebel方式运行项目

Jboot使用jrebel 热更新代码

修改下代码,就自动刷新了