spring-cloud-commons icon indicating copy to clipboard operation
spring-cloud-commons copied to clipboard

Why does RefreshScope refresh all beans instead of only refreshing the beans that are dependent on the configuration item? org.springframework.cloud.context.refresh.ContextRefresher#refresh

Open Jcateye opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe. When I update a particular configuration in Nacos in a production environment with high concurrency, some servers will remain unresponsive for a long time.

Describe the solution you'd like Update only the properties of the Bean corresponding to the configuration item.

Describe alternatives you've considered Dispose of the currently associated bean, initialize it directly, and replace the original object reference.

Additional context org.springframework.cloud.context.refresh.ContextRefresher#refresh image

Jcateye avatar Sep 08 '23 07:09 Jcateye

Is there any progress here? @Jcateye have you solved this somehow?

shamrai-dev avatar Apr 22 '24 13:04 shamrai-dev

Why does RefreshScope refresh all beans instead of only refreshing the beans that are dependent on the configuration item?

It's hard/impossible to know which beans are affected by particular configuration item.

quaff avatar Feb 07 '25 08:02 quaff