spring cloud config java.lang.IllegalStateException: Could not locate PropertySource and the fail fa

异常信息

你好! 这是你第一次使用 **Markdown编辑器** 所展示的欢迎页。如果你想学习如何使用Markdown编辑器, 可以仔细阅读这篇文章,了解一下Markdown的基本语法知识。

错误原因

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}

在这里插入图片描述

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值