Here is my scenario: My micro service gets notified about some changes of its configuration from the central conf server. It can be partial update, or a full. I use @RefreshScope mark on relevant beans. The question is how to update marked beans, I mean reload them. Just to clarify: From Spring Cloud I use only RefreshScope.
Any ideas?
org.springframework.boot:spring-boot-starter-actuator
in your project.refresh
endpoint.For example, you configure your management endpoint like below.
curl -X POST http://localhost:8001/manage/refresh
will trigger refreshing changed configuration.management: context-path: /manage port: 8001 security.enabled: false