spring-cloud / spring-cloud/spring-cloud-consul
Wrong priority order of multiple configs in bootstrap mode
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 822
- Forks
- 539
- Avg merge
- 9h 31m
- Merged PRs (30d)
- 7
Description
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 Consul Config take a similar order when using spring.config.import
1. consul:config/foo,dev/data
2. consul:config/application,dev/data
3. consul:config/foo/data
4. consul:config/application/data
BUT when using bootstrap mode, the client load configs in a strange priority order:
1. consul:config/foo,dev/data
2. consul:config/foo/data
3. consul:config/application,dev/data
4. consul:config/application/data
this can be confirmed by using /actuator/env api.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce bootstrap mode and inspect the /actuator/env API using the configuration ordering shown in the issue; compare it with spring.config.import behavior. Trace the Spring Cloud Consul bootstrap configuration loading path, then verify that the four entries resolve in the stated priority order.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring, spring-boot
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100