You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The ConfigurationPropertiesRebinder refresh mechanism works by performing destroy and initial processes on existing bean objects. During refresh, some property values may not be properly handled (for example, if certain configuration items are deleted, the corresponding property values are not cleared). To clear these property values, I need to add the @RefreshScope annotation and leverage its mechanism to refresh the inner bean. However, I am cautious about using the @RefreshScope annotation because its lazy loading and re-creation behavior may lead to bean retrieval failures or slowdowns (such as exceptions thrown in constructors or lifecycle methods).
Describe the solution you'd like
Is it possible to initialize a new bean during the ConfigurationPropertiesRebinder binding process and assign its values to the original bean? This would align the refresh behaviors of @RefreshScope and ConfigurationProperties.
The text was updated successfully, but these errors were encountered:
This seems somewhat similar to the issue mentioned in #1372. Is there already a plan to address this? (Feel free to close this issue and continue the discussion in #1372.)
Is your feature request related to a problem? Please describe.
The ConfigurationPropertiesRebinder refresh mechanism works by performing destroy and initial processes on existing bean objects. During refresh, some property values may not be properly handled (for example, if certain configuration items are deleted, the corresponding property values are not cleared). To clear these property values, I need to add the @RefreshScope annotation and leverage its mechanism to refresh the inner bean. However, I am cautious about using the @RefreshScope annotation because its lazy loading and re-creation behavior may lead to bean retrieval failures or slowdowns (such as exceptions thrown in constructors or lifecycle methods).
Describe the solution you'd like
Is it possible to initialize a new bean during the ConfigurationPropertiesRebinder binding process and assign its values to the original bean? This would align the refresh behaviors of @RefreshScope and ConfigurationProperties.
The text was updated successfully, but these errors were encountered: