使用 Jrebel 和 idea 快速远程部署和调试

使用 Jrebel 和 idea 快速远程部署和调试


快速远程部署

1. idea 安装 Jrebel 插件

过程百度,比较简单,记得激活。

2. 在服务器上安装 Jrebel

参考 JRebel remote server support in IntelliJ IDEA — JRebel 2019.x documentation

  1. 下载安装包

    curl -O http://dl.zeroturnaround.com/jrebel-stable-nosetup.zip

  2. 解压安装包

    unzip jrebel-stable-nosetup.zip

  3. 设置 Jrebel 密码

    java -jar jrebel.jar -set-remote-password 12341234

  4. 激活服务端(/bin 下执行)

    ./activate.sh https://jrebel.qekang.com/bb25c9bf-7695-48d6-b1a0-baf893ca7631 [email protected]

    其他激活方式见:Activation — JRebel 2019.x documentation

3. 本地设置

  1. startup 设置

  2. remote server 设置

  3. 生成 rebel.xml

  4. 重启

4. 远程热部署

远程调试

1. 在 idea 中配置远程环境

2. 在服务的启动参数中加上远程调试相关参数

3. 启动调试

你可能感兴趣的:(使用 Jrebel 和 idea 快速远程部署和调试)