-
Notifications
You must be signed in to change notification settings - Fork 151
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
Add support for config data api and consul backend #580
Conversation
…es for config data api to discover consull backend
With the Config Data API, we need to inject an |
Thank you for your contribution. That's merged and polished now. |
@mp911de - How do we ensure the ordering of the data loaders? For example |
@philwebb @mbhave -Any thoughts on how we could introduce dependencies in the config import for the use cases such as vault and consul being used in an integrated fashion? I am not sure if such capability exists. But please let me know if you would like me to raise an issue under spring-boot. Thanks for your help! |
@krisiye Can you provide more details on what the use case is and how it's expected to work? I'm not sure I understand what is supposed to happen so hard to say without that information. |
Sure @mbhave. I have a spring boot In the legacy bootstrap strategy, we had a workaround that is documented here: https://gist.github.com/mp911de/17f550ffecdc9e8f22061bfdf896bbb4 The question here is if this can be fixed for the config data api with any dependency configuration for the imports? I could not find anything in the documentation that indicates such a capability exists. Please let me know if you need anymore information. |
@krisiye Looking at the code, I think that import are loaded in reverse order. So if you have You could try switching the order to see if that solves your issue. |
Thanks @philwebb. Tried reversing the order here to |
@krisiye Yes please. It would also be helpful if you're able to provide a sample that shows the problem. |
@philwebb Logged an issue for this - spring-projects/spring-boot#25705 |
@philwebb @mbhave - Updated spring-projects/spring-boot#25705 and provided a test case for this issue. Sorry, this took a while as it was a little challenging to get a self-contained example with test containers and roles for demonstrating this issue. |
Register SecretBackendMetadataFactory for consul under spring.factories for config data API to discover consul backend.
Fixes #579