一、场景
启动spring-cloud配置中心的时候,报了以下错误
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.
二、解决方式
1.添加profiles配置
spring:
profiles:
active: native
2.添加git指向
spring:
cloud:
config:
server:
git:
uri: #配置git服务地址
username: #配置git用户名
password: #配置git密码

当启动Spring Cloud配置中心时遇到错误提示,需要设置配置文件的profiles。解决方案包括:1) 激活'native'配置,通过添加'spring.profiles.active=native';2) 如果使用git配置,需要提供git服务器地址、用户名和密码。
885

被折叠的 条评论
为什么被折叠?



