Skip to content
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

Bootstrap fails when embedding config server #1257

Open
tcbcw opened this issue Jul 25, 2023 · 0 comments
Open

Bootstrap fails when embedding config server #1257

tcbcw opened this issue Jul 25, 2023 · 0 comments

Comments

@tcbcw
Copy link

tcbcw commented Jul 25, 2023

When embedding a Cloud Config Server and bootstrapping from that config server, the steps require using the spring.cloud.config.server.bootstrap: true flag.
https://cloud.spring.io/spring-cloud-config/multi/multi__embedding_the_config_server.html

However, the bootstrapping has been deprecated and was broken with the fix for #1158 .
Previous to this fix, when bootstrapping, two contexts would be created. The top-level was the bootstrap context and the second level was the application's context. The bootstrap context contained the bean for org.springframework.cloud.config.client.ConfigClientProperties, but the application context contained the propertySource for bootstrap.yml.

Before the fix for #1158, the ConfigurationPropertiesRebinder would bind the bean found in the bootstrap context using the application context's propertySources. I agree that this seems wrong, and can cause issues like described in #1158, however, now that the bean and propertySources need to be in the same context, I can't see a way to get an application to bootstrap properly. I believe this is a bug.

The last working version was org.springframework.cloud:spring-cloud-context: 3.1.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants