spring-cloud / spring-cloud/spring-cloud-config

Spring Cloud Config Server - Multi-File Composition / Importing

Open
#2,335 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement feedback-provided waiting for votes
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.