Skip to content

Allow Specifying ConfigData.Options On ConfigDataEnvironmentContributors #42932

Closed
@ryanjbaxter

Description

@ryanjbaxter

As part of the Spring Cloud Config Server we utilize Spring Boot's ConfigDataEnvironmentPostProcessor to populate an Environment with PropertySources from various environment repositories that utilize the file system (Git, SVN, native).

You can see how we use it here.

We would like the ability to customize the ConfigData.Options that are set on the ConfigDataEnvironmentContributors the PostProcessor creates. Specifically for our use case we would like to basically tell the environment to ignore any profiles that it might find included or activated by adding ConfigData.Options.IGNORE_PROFILES.

This would allow the Spring Cloud Config client to make a request to the config server to return only the non-profile-specific property sources allowing Spring Boot to then activate all the profiles from all config data sources and then make a subsequent request to the config server to then get all profile specific property sources. Currently with no way to do this the config server will return profile specific property sources if any of the configuration files in the environment repository includes spring.profiles.active or spring.profiles.include.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions