> 文章列表 > springBoot启动慢

springBoot启动慢

springBoot启动慢

解决方法,查看线程执行堆栈,linux使用的是openJdk,使用本地javaVisualVM连上远程。

启动参数加入:

-Djava.rmi.server.hostname=xxx

-Dcom.sun.management.jmxremote=true

-Dcom.sun.management.jmxremote.port=xxx

-Dcom.sun.management.jmxremote.ssl=false

-Dcom.sun.management.jmxremote.authenticate=false

"main" - Thread t@1
   java.lang.Thread.State: RUNNABLE
        at java.net.Inet4AddressImpl.getLocalHostName(Native Method)
        at java.net.InetAddress.getLocalHost(InetAddress.java:1475)
 

加入本机hostname解析,问题解决.