Search code examples
spring-cloudspring-cloud-config

Spring Cloud Config: How to refresh configuration after client has been started?


Supposing I have info.name=bruce stored in config server A but server A hasn't started yet. Now I start a client with local configuration info.name=Neo. Apparently info.name is equal to Neo for this client. I think info.name should be replaced with bruce if I start config server A, but in fact info.name is still Neo.

So my question is if client starts without config server, will it retrieve configuration again when config server starts?


Solution

  • I've figured it out. Local configuration takes priority of the remote's because of the absence of the config server(Client will load local configuration first). Removing the info.name property from client configuration solved my problem.