查找本机的hostname
打开terminal运行: hostname
输出的hostname可能带.local可能不带.local,比如我的输出的就是 MacBookPro
修改hosts文件
vim /etc/hosts
把hostname原封不动地加到/etc/hosts文件的127.0.0.1 localhost和::1 localhost的后面,我的/etc/hosts修改后如下
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost MacBookPro
255.255.255.255 broadcasthost
::1 localhost MacBookPro
0.0.0.0 account.jetbrains.com
然后再运行原来的Spring Boot项目发现至少快了很多
网友评论