So I recently learned this awesome config service of Spring Cloud, and after some struggling I'm able to get our distributed application set up, with multiple nodes reading config properties from one config server.
However one problem I don't know how to resolve is even though most props are same across multiple nodes, some props need local version and I don't know how to set local prop together with config service.
For example this is my bootstrap.properties
,
spring.cloud.config.uri=${config.server:http://localhost:8888}
spring.application.name=worker
If I add additional props under bootstrap.properties
or in a separate application.properties
file, I can see them under actuator's env endpoint, like this,
configService:file:///home/me/work/config-test/worker.properties:
{
server.timeout: "100"
},
applicationConfig: [classpath:/application.properties]: {
server.timeout: "50"
},
In my app the server.timeout
will always be 100 now, I don't know how can I reference a local value when I use a centralized config service like this?