spring-cloud / spring-cloud-config

External configuration (server and client) for Spring Cloud
Apache License 2.0
1.97k stars 1.29k forks source link

config pattern priority #1212

Closed linjisong closed 5 years ago

linjisong commented 5 years ago

In my project, the following is configured

spring:
  profiles: git
  cloud:
    config:
      server:
        default-label: master
        git:
          uri: https://github.com/smartapi-cloud-config-repo.git
          repos:
            smartapi-cloud-demo:
              pattern: smartapi-cloud-demo-*
              uri: https://github.com/smartapi-cloud-config-demo.git
            smartapi-cloud:
              pattern: smartapi-cloud-*
              uri: https://github.com/smartapi-cloud-config.git

I want smartapi-cloud-demo-base to visit https://github.com/smartapi-cloud-config-demo.git, but actually access https://github.com/smartapi-cloud-config.git, here Pattern matching has no priority?

spencergibb commented 5 years ago

You are mixing paradigms. By providing git.uri it will always go there first