I know the advantages of implementing a remote configuration management system, and specifically of the Spring Cloud configuration server. From Spring Microservices in Action book, Chapter 2:
When a microservice starts, any environment-specific information or application configuration information data should be
- Passed into the starting service as environment variables
- Read from a centralized configuration management repository
As I understand, when you use a Config First Bootstrap approach, the only piece of configuration that should be in any other microservice is related to the config server (e.g. specifying the spring.application.name
in bootstrap.yml
and passing the spring.cloud.config.uri
and spring.profiles.active
as environment variables). No need for application.yml
at all.
So, I'm a little confused after seeing some people asking (here, here and here) how to overwrite the remote configurations locally and read this Overriding the Values of Remote Properties section in Spring Cloud documentation:
The property sources that are added to you application by the bootstrap context are often "remote" (e.g. from a Config Server), and by default they cannot be overridden locally, except on the command line. If you want to allow your applications to override the remote properties with their own System properties or config files, the remote property source has to grant it permission by setting
spring.cloud.config.allowOverride=true
(it doesn’t work to set this locally). (...)
Is there a valid case in Spring Cloud to set a partial local configuration or even override the remote configuration?