这个是 macos 存在的一个问题,解决方案如下:
在 /etc/hosts 中添加本地 hostname 的 dns 解析,执行 hostname 命令,将 hostname 命令输出的结果添加到 /etc/hosts 中,类似于:
127.0.0.1 localhost xxx.local ::1 localhost xxx.local
参考:
https://thoeni.io/post/macos-sierra-java/
https://stackoverflow.com/questions/33289695/inetaddress-getlocalhost-slow-to-run-30-seconds
https://github.com/spring-projects/spring-boot/issues/7087
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)