Springboot 启动WARN : InetAddress.getLocalHost().getHostName() took 55910 milliseconds to respond Please verify your network configuration. 导致启动异常缓慢甚至卡顿,起不起来。
先查本机hostname:
hostname
server-01
vi /etc/hosts
127.0.0.1 localhost localhost.localhostdomain localhost4 localhost4.localdoman4
::1 localhost localhost.localhostdomain localhost6 localhost6.localdoman6
修改后为
127.0.0.1 localhost server-01 localhost.localhostdomain localhost4 localhost4.localdoman4
::1 localhost server-01 localhost.localhostdomain localhost6 localhost6.localdoman6
:wq保存
重新启动服务即可