fix: #326 修复 SpringCloud 下,远程配置文件修改(如Nacos),本地ConfigurationProperties 配置类没… #327
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
‘Spring Cloud’ 中绝大多数对 ‘Spring Environment’ 操作的组件,应当比 ‘ConfigurationPropertiesRebinder’ 优先级要高,否则就会出现 ‘ConfigurationProperties’ 配置类更新不及时的问题。所以建议这里的 ‘RefreshScopeRefreshedEventListener’ 优先级不要设置成最低,只要比 ‘ConfigurationPropertiesRebinder’ 高即可;
-- from the technical team of YXT(yxt.com)
The vast majority of components in 'spring cloud' that operate on 'spring environment' should have higher priority than 'configurationpropertiesrebinder'. Otherwise, the 'configurationproperties' configuration class will not be updated in time. Therefore, it is recommended that the priority of 'refreshscoperefreshedeventlistener' should not be set to the lowest, as long as it is higher than 'configurationpropertiesrebinder';