Reputation: 131
According to the docs, to connect to the config server, spring.application.name
and spring.cloud.config.uri
should be set in a bootstrap.properties
file for the config client, such that the parameters fetched from the config server can be prior to those set locally. I am just wondering how this works, since:
bootstrap.properties
spring.application.name
in application.properties
Is it a feature of SpringBoot?
Upvotes: 0
Views: 100
Reputation: 448
This feature is not located in spring-cloud-config. Instead, it is in spring-cloud-context which is a dependency of spring-cloud-config.
Basically, it creates a parent context for the actual context of the application and initializes it with the parameters of the bootstrap.
You can find more information in https://cloud.spring.io/spring-cloud-commons/multi/multi__spring_cloud_context_application_context_services.html
Upvotes: 1
Reputation: 25177
It is a feature of spring cloud. The spring.cloud.config.uri
needs to be set in bootstratp.properties
. This comes from the spring-cloud-commons project. My guess is you might be running the config server in the default location of localhost:8888
.
Upvotes: 0