spring-cloud / spring-cloud/spring-cloud-config
Multiple Configuration Files for same service
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 2k
- Forks
- 1.3k
- Avg merge
- 2d 59m
- Merged PRs (30d)
- 16
Description
This is more a question/or if there's a workaround for what I'm trying to do:
Consider a Spring Cloud Config Server with (profile is just an example, would be applicable to others, git, etc.)
profile: native
searchLocations: /somewhere/config
And Service A (Spring Cloud Config Client) with
spring.cloud.config.name=service-a
As is stands, Service A will request service-a.yml from config folder on Server.
Now I want to include a few more files to my service configuration, so my server config folder looks like this:
config/
service-a.yml
/service-a/a.yml
/service-b/b.yml
Configuring Service A (Spring Cloud Config Client) as
spring.cloud.config.name=service-a,service-a(_)a,service-a(_)b
This does not allow me to fetch these files unless I update the searchLocations to look like
searchLocations: /somewhere/config,/somewhere/config/service-a
Is there a workaround so I don't have to keep changing the searchLocations?
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
Start by tracing how the Spring Cloud Config Server native profile handles searchLocations and how the client resolves spring.cloud.config.name values. Confirm whether multiple service-specific files can be discovered without changing searchLocations; done means documenting a supported workaround or clearly establishing that the behavior requires a feature change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring-boot
- Domain
- backend, cloud
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100