Arthas之在线编辑,热更新代码【版本3.1以上】

windows下

C:\Users\Administrator>jps -l
10784 org.jetbrains.jps.cmdline.Launcher
17744
9076 sun.tools.jps.Jps
4184 com.fei.TestApplication

 as.bat 进程ID

C:\Users\Administrator>as.bat 4184

启动成功!!!

Arthas之在线编辑,热更新代码【版本3.1以上】_第1张图片

1、使用jad反编译代码

$ jad --source-only com.ruoyi.web.TestServlet > /tmp/TestServlet

2、使用编辑器编译代码

Arthas之在线编辑,热更新代码【版本3.1以上】_第2张图片

3、使用mc命令编译修改后的UserController.java

$ mc /tmp/TestServlet -d /tmp

4、使用redefine命令,因为可以热更新代码

$ redefine /tmp/com/ruoyi/web/TestServlet.class
redefine success, size: 1

编译的时候,如果出错了,可以查看日志

Arthas之在线编辑,热更新代码【版本3.1以上】_第3张图片

参考地址:https://yq.aliyun.com/articles/690240

转载于:https://my.oschina.net/u/3568600/blog/3071534

你可能感兴趣的:(Arthas之在线编辑,热更新代码【版本3.1以上】)