Jboot使用jrebel 热更新代码
1、打开IntelliJ IDEA,点击File -> Settings -> Plugins,如下图:
我这里是安装好了的
2、配置IDEA:idea中command+shift+a ,在弹出浮层中输入registry
在compiler.automake.allow.when.app.running 选中,关闭窗口
4、之后再设置idea为自动编译。
5、项目中配置Jrebel:在项目的module右键,弹出菜单最下边JReble。如图:
会自动生产rebel.xml 配置文件
6、配置Jrebel 服务器,你项目要用到的端口
7、配置项目,这个端口就是jboot.properties 中的 jboot.server.port=28089
8、启动参数加上 -Drebel.remoting_plugin=true
9、以rebel方式运行项目
修改下代码,就自动刷新了