首页 > 编程语言 > 详细

解决springboot在mac电脑下启动过慢的问题

时间:2019-10-24 22:04:34      阅读:126      评论:0      收藏:0      [点我收藏+]

自从用了mac以后,springboot启动的时候一直卡在build环节10多秒

但是在linux和Windows环境下,启动只要6秒,后面查看了一下其他

人也遇到这种问题,原来是需要在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

只需要在最后一行里面加上自己机器名即可,如下:

::1             localhost ttk-mac.local

ttk-mac是我的mac机器名。至于如何查看机器名,最简单的方法就是通过hostname命令查看。

通过这个配置,可以大幅提高spingboot项目在mac上的启动速度。

 

解决springboot在mac电脑下启动过慢的问题

原文:https://www.cnblogs.com/withscorpion/p/11734639.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!