Mac under the IDEA project slow start Springboot

After Baidu and google query found, call java.net.InetAddress.getLocalHost () method on startup. This method is invoked to troubleshoot this problem slowly.

Online solutions are modified hosts, and later it was suggested that the reason is because of the slow dns resolution issue. Before realized that because of a problem modified dns,

Then restore the default dns, reboot. Perfect to solve the problem. Before calling this method takes approximately 30s-50s, now is 20ms-40ms.

Guess you like

Origin www.cnblogs.com/WPF0414/p/11609254.html
Recommended