Wrinkles should merely indicate where smiles have been.
皱纹应该只是微笑留下的印记
这个问题折腾来足足有一上午的时间,修改了Spring-boot版本,jdk版本,及tomcat挨个排除了一遍问题。结果竟然是只需localhost的映射名就可以
默认的hosts在这个路径下 /private/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
255.255.255.255 broadcasthost
::1 localhost
# Copyright (c) 2014-2017, racaljk.
# https://github.com/racaljk/hosts
# Last updated: 2017-08-05
查看本机的hostname, 只需在命令行输入hostname
就行,注意这个不是你的用户名,本人刚开始就当成一个了。
找到hostname修改host文件
##
# 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 你的机器名.local
255.255.255.255 broadcasthost
::1 localhost 你的机器名.local
修改本机的hostname方法
sudo scutil --set HostName XXX
注:也可以在这里查看本电脑的hostname
网友评论