-
Notifications
You must be signed in to change notification settings - Fork 705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ConfigurationProperties
changes can not be seen when EnvironmentChangedEvent
happens
#587
base: main
Are you sure you want to change the base?
Conversation
…lways see `ConfigurationProperties` changes when `EnvironmentChangedEvent` happens
Shouldn't the |
Maybe the creation of a bean is very expensive(for example, |
I still don't see what this fixes. Can you provide a test that fails prior to this change? |
Here is a more meaningful example:
What I want to do is refresh the datasource's MaxTotal property dynamically using the following steps:
I found that this is because that |
I still dont see why adding |
Adding @RefreshScope to DataSourceDynamicProperties still don't work, to make this work, another thing should be done too: change I think supporting
This PR is to let users does not need to care about the order. just like what |
We use the following code and expect that after refresh, someProperties.getProperties() will be changed, but it does not. only when refresh is triggered one more time, the change can be seen.
This PR improves this, give ConfigurationPropertiesRebinder a very high order so users can always see
ConfigurationProperties
changes whenEnvironmentChangedEvent
happens.