热部署插件

2021/7/20 插件

# 热部署插件

# 插件安装

Intellij热部署插件JRebel 安装JRebel 激活JRebel 相关设置 Intellij热部署插件JRebel 安装和使用JRebel需要注意两点:激活和设置

安装JRebel

1、在IDEA中一次点击 File->Settings->Plugins->Brows Repositories

2、在搜索框中输入JRebel进行搜索

3、找到JRebel for intellij

4、install

5、安装好之后需要restart IDEA

image-20210720094725378

# 激活JRebel

image-20210720102405125

  • 在IDEA中一次点击 File->Settings->JRebel 并找到激活界面

image-20210720102426723

  • 选择JRebel activated中的 connect to online licensing service

第一行输入 http://127.0.0.1:8888/d3545f42-7b88-4a77-a2da-5242c46d4bc2

第二行输入正确的邮箱格式,例如: test@123.com

再点击以下change liense 按钮验证激活

提示:d3545f42-7b88-4a77-a2da-5242c46d4bc2为UUID,可以自己生成,并且必须是UUID才能通过验证

image-20210720102453719

  • 最后别忘了把JRebel设置为offline模式 点一下work offline

image-20210720102520186

# 相关设置

此时虽然安装好了JRebel并成功激活了,但是我们使用JRebel debug的时候,发现修改代码后,热部署不起作用。因为还需要设置两个地方

  • 设置项目自动编译

image-20210720102638149

  • 设置 compiler.automake.allow.when.app.running

    ctrl+shift+A 或者 help->find action…打开 搜索registry 找到 compiler.automake.allow.when.app.running 并✔

    image-20210720102656105