spring-cloud / spring-cloud-zookeeper

Spring Cloud Zookeeper
http://cloud.spring.io/spring-cloud-zookeeper/
Apache License 2.0
556 stars 413 forks source link

Wrong priority order of multiple configs in bootstrap mode #302

Closed woshikid closed 1 year ago

woshikid commented 2 years ago

When using Spring Cloud Config, the priority order of multiple configs is as follow: (both import mode and bootstrap mode)

1. configserver:foo-dev.yml
2. configserver:application-dev.yml
3. configserver:foo.yml
4. configserver:application.yml

and Spring Cloud Zookeeper Config take a similar order when using spring.config.import

1. zookeeper:config/foo,dev
2. zookeeper:config/application,dev
3. zookeeper:config/foo
4. zookeeper:config/application

BUT when using bootstrap mode, the client load configs in a strange priority order:

1. zookeeper:config/foo,dev
2. zookeeper:config/foo
3. zookeeper:config/application,dev
4. zookeeper:config/application

this can be confirmed by using /actuator/env api.

woshikid commented 2 years ago

I've made a PR #303 on this.

spencergibb commented 1 year ago

Closing in favor of #303