在idea中配置JVM参数
-Djava.rmi.server.hostname=127.0.0.1
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=4444
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
在 jconsole 中配置远程连接
注意:
项目使用的JDK如果是idea自带的可能会报连接异常的错误