Skip to content

Allow for programatic access to new ConfigDataEnvironment processing #22601

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

Closed
spencergibb opened this issue Jul 27, 2020 · 3 comments
Closed
Labels
theme: config-data Issues related to the configuration theme type: enhancement A general enhancement
Milestone

Comments

@spencergibb
Copy link
Member

spencergibb commented Jul 27, 2020

Spring Cloud uses SpringApplication as an api in a few different ways to get at boots configuration processing.

  1. bootstrap
  2. re-fetching remote config and re-applying to environment
  3. config server for loading config files (from git, filesystem, etc...)

For the 1st, hopefully, we can eliminate bootstrap all together.

To test the 2nd, I made ConfigDataEnvironment, its constructor, and processAndApply() public and made a change here spring-cloud/spring-cloud-commons@24f444b and it was successful.

For the 3rd, I still need to do a POC on config server.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jul 27, 2020
@spencergibb
Copy link
Member Author

In doing very initial coding for config server (not client like I did with the resolver), it may be nice to have an api for setting up spring.config.location and friends. Currently having to add a PropertySource to the environment passed into ConfigDataEnvironment.

@philwebb philwebb added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Jul 27, 2020
@philwebb philwebb added this to the 2.4.x milestone Jul 27, 2020
@mbhave mbhave added the theme: config-data Issues related to the configuration theme label Jul 28, 2020
@mbhave
Copy link
Contributor

mbhave commented Jul 28, 2020

@spencergibb We did a POC for spring-cloud-consul-config using a ConfigDataLocationResolver. I guess that falls in the bootstrap bucket?

@spencergibb
Copy link
Member Author

@mbhave yes, I used it to do my config server POC. The thing that used to initiate consul config started in bootstrap, so I guess yeah.

spencergibb added a commit to spring-cloud/spring-cloud-commons that referenced this issue Jul 31, 2020
ConfigDataEnvironment is package protected, so ConfigDataAccessor was created in the same package as a workaround until spring-projects/spring-boot#22601 is done
@snicoll snicoll changed the title Allow for programatic access to new ConfigDataEnvironment processing. Allow for programatic access to new ConfigDataEnvironment processing Aug 5, 2020
@philwebb philwebb modified the milestones: 2.4.x, 2.4.0-M2 Aug 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme: config-data Issues related to the configuration theme type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

4 participants