异常信息

错误原因
1、config server 中 default-label 与git或SVN分支对应不上
2、config client 中 label 与git或SVN分支对应不上
解决方法
1、在git 或SVN上创建对接分支
2、config server和config client 配置git或svn对应分支
配置方式如下:
- config server default-label 替换成Git或SVN已有分支
spring:
application:
name: herion-config-server
profiles:
active: dev
cloud:
config:
server:
git:
uri: https://xxxx/herion/jfintech-config.git
default-label: ${spring.profiles.active}

- config client label 替换成Git或SVN已有分支
spring:
application:
name: herion-confit-client
profiles:
active: dev
cloud:
config:
fail-fast: true
discovery:
service-id: herion-config-server
enabled: true
profile: ${spring.profiles.active}
label: ${spring.profiles.active}


本文详细解析了Spring Cloud配置中心出现异常时的常见原因,包括configserver与configclient的default-label和label设置与Git/SVN分支不匹配的问题,并提供了具体的解决步骤和配置示例。
3万+





