Config启动报错:If you are using the git profile, you need to set a Git URI in your configuration.

本地启动服务报错如下

***************************
APPLICATION FAILED TO START
***************************

Description:

Invalid config server configuration.

Action:

If you are using the git profile, you need to set a Git URI in your configuration.  If you are using a native profile and have spring.cloud.config.server.bootstrap=true, you need to use a composite configuration.

在这里插入图片描述
这个问题是配置问题,某个配置无效,具体是为什么我暂时还没有了解清楚,但是我的解决了(如果后续知道了这里将会继续更新)
解决方案:

第一种

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述
重启一下,前提是本地必须有配置文件
在这里插入图片描述
如果重启不成功下图所示的地方写了就要去掉
在这里插入图片描述
友情链接:玩转Spring Cloud之配置中心
配置中心(Config-Server)

猜你喜欢

转载自blog.csdn.net/qq_42071369/article/details/120829597