spring-cloud / spring-cloud/spring-cloud-config
Spring Cloud Config Server - Multi-File Composition / Importing
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 2k
- Forks
- 1.3k
- Avg merge
- 2d 59m
- Merged PRs (30d)
- 16
Description
Is your feature request related to a problem? Please describe.
I'm trying to group blocks of configuration into individual files for clarity. Unfortunately, I can't find any documentation on if Spring Cloud Config Server offers the ability to reference other Spring Cloud Config Server files from within a given file and have them imported / included in the final rendered file.
Describe the solution you'd like
Much in the same way that Spring Boot offers the spring.config.import option, I'd like to see a way to import or include populated Spring Cloud Config Server files part-a.properties & part-b.properties in template.properties. Maybe name it ${spring.cloud.config.import}
# part-a.properties
property.a=SOME_VALUE_A
# part-b.properties
property.b=SOME_VALUE_B
# template.properties
${spring.cloud.config.import=part-a.properties}
${spring.cloud.config.import=part-b.properties}
Spring Cloud Config Server rendered template.properties:
# template.properties
# part-a.properties
property.a=SOME_VALUE_A
# part-b.properties
property.b=SOME_VALUE_B
Describe alternatives you've considered
Specifying every single property that we want to include is cumbersome and lacks clarity.
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
The issue names no files, tests, or entry points. Start by reviewing how Spring Cloud Config Server renders a requested properties file and how Spring Boot's spring.config.import works; done should include a documented or tested way to compose part-a.properties and part-b.properties into template.properties.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring, spring-boot
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100