-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Embedded configuration server does not load application properties #2129
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
Comments
Can you try adding the dependency Also can you move
to bootstrap.yml |
Hi Ryan,
I suppose that the property spring.cloud.config.server.bootstrap: true could be moved to application.yaml. After moving that property back to application.yaml, the application starts, but the properties are not loaded. |
OK I didn't realize that you were configuring your own EnvironmentRepository. To make this you need to make sure your EnvironmentRepository so its available via bootstrap. Here is a modified project that works |
It was the missing bit! Now it works like a charm. Thank you very much Ryan, I'm going to update the sample project and reply the question on stack overflow so it could help someone else. |
…comment-1205380161
I'm using Spring Cloud Config 3.1.3 with Spring Boot 2.7.2.
I created an embedded configuration server using the instructions contained in the official documentation.
My goal is embedding the configuration server into an application. The application should load the configuration properties provided by the embedded configuration server using a custom EnvironmentRepository.
It seems that this should be possible:
But the configuration properties are not loaded.
This is the sample project:
https://github.com/taxone/embedded-config-server
The custom repository works fine if the endpoint below is called:
http://localhost:8888/config/application/default
and the response is:
but the property is not injected:
It seems that someone else had a similar issue on stack overflow.
The text was updated successfully, but these errors were encountered: