-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spring Cloud Config Server - Multi-File Composition / Importing #2335
Comments
Even You can have the config server serve up the files in your example by making a request to |
Thanks for the input @ryanjbaxter. One of the benefits of Spring Cloud Config Server is that it doesn't just work with Spring clients but can serve up populated config files directly to be consumed by other types of applications - hence my desire for the rendered result rather than the notion of multiple property sources. Trying to include the multiple profiles seems to only render the results of the first matching file/profile. |
So are you using the config server to serve up specific files? Can you provide an example of the requests you are making to the config server? |
Where:
|
Essentially what you are looking for a way to return multiple config files in a single request, correct? |
In the simplest sense - yes. But I could see the benefit to doing something like: # template.properties
info.app.name=${application.name}
info.app.version=${application.version}
${spring.cloud.config.import=part-a.properties}
${spring.cloud.config.import=part-b.properties} getting rendered to: # template.properties
info.app.name=Something Useful
info.app.version=1.2.3.4
# part-a.properties
property.a=SOME_VALUE_A
# part-b.properties
property.b=SOME_VALUE_B where there's a mix of populated properties and resolved property file contents |
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 filespart-a.properties
&part-b.properties
intemplate.properties
. Maybe name it${spring.cloud.config.import}
Spring Cloud Config Server rendered
template.properties
:Describe alternatives you've considered
Specifying every single property that we want to include is cumbersome and lacks clarity.
The text was updated successfully, but these errors were encountered: