IDEA 热部署,修改代码不用重启项目

热部署指在修改项目代码的时候不重启服务器让修改生效。
安装 JRebel and XRebel
File->Settings,然后 Plugins-> Marketplace,输入 JRebel,安装如下插件——JRebel and XRebel ,重启 idea

激活 JRebel and XRebel

第一行输入网址:https://jrebel.qekang.com/{GUID}
{GUID}在https://www.guidgenerator.com/online-guid-generator.aspx这里获得
第二行是邮箱地址,写自己的就行
然后选择 Help -> JRebel -> Configuration ,点击 Work offline(离线模式运行)
安装 Jrebel MybatisPlus Extension
Jrebel MybatisPlus Extension,顾名思义就是热部署中 mybatis 的扩展,他的功能就是配合 Jrebel 一起使用,修改 mybatis 的 mapper.xml 文件不用重启项目,听起来是不是很爽,安装下赶紧去试试吧。
在 File -> Setting -> plugin 搜索框搜索 Jrebel MybatisPlus Extension,点击右侧的 install 按钮即可

解决不生效问题
1、没开启自动编译

2、情况二(代码热部署问题)(alt+ctrl+shif+/)

3、没配置需要热部署的项目这个是关键,各位切记一定要勾选生产 jrebel.xml

至此热部署安装完成,这个开发技巧你学会了吗
评论