'Spring cloud config property updating through post actuator endpoint
I am using spring cloud config in my spring boot application. I have a GitHub repo with all config properties (status), config-server and a config-client application.
When I change the config (status=ONLINE) in GitHub repo manually and hit the refresh endpoint, everything works fine.
*Now let's say I want to use this post api(to update the property) {application-url}/actuator/env with body as name and value (status=OFFLINE) of one of the config property and hit the refresh endpoint, my config-client application will get the latest value. Everything is okay till now.
But at this time, if my config-client application goes down and comes back after some time it will get that property value from GitHub repo, which doesn't have the latest value (status value in GitHub is ONLINE) since I updated it using post actuator/env endpoint.
Now after restart, how my application supposed to know the latest value which got updated with endpoint?? Is this how it's going to be? OR is there any solution to this if I want to update the property dynamically with post API not manually.
Please let me know.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
