withscorpion

自从用了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上的启动速度。

 

分类:

技术点:

相关文章:

  • 2021-08-21
  • 2022-12-23
  • 2022-02-19
  • 2021-09-21
  • 2022-01-18
  • 2021-10-09
  • 2021-11-07
  • 2022-01-15
猜你喜欢
  • 2021-10-09
  • 2021-09-27
  • 2021-12-06
  • 2022-02-04
  • 2021-09-21
  • 2021-09-21
相关资源
相似解决方案