Skip to content
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

服务端配置修改后,不支持@Value值的动态变更 #285

Closed
wuhaoqiang1 opened this issue Apr 27, 2022 · 2 comments
Closed

服务端配置修改后,不支持@Value值的动态变更 #285

wuhaoqiang1 opened this issue Apr 27, 2022 · 2 comments

Comments

@wuhaoqiang1
Copy link
Contributor

服务端配置修改后,不支持@value值的动态变更

Type: feature request

希望作为配置中心可以做到服务端修改配置,@value值的动态变更

作为动态配置中心,应更加关注到使用者业务,目前@NacosValue注解支持值动态变更,@value值不支持,

  1. @NacosValue注解的表达式解析较差,不支持如:123${key1}{key2}321等表达式,不如@value
  2. 耦合性太高,后续项目更改动态配置中心,所有使用@NacosValue的地方都需要更改
@mercyblitz
Copy link
Contributor

@value 不应该支持动态切换,可以将 @NacosValue 增强即可

@wuhaoqiang1
Copy link
Contributor Author

为什么@value不应该支持,用@value不是更贴近于Spring,降低耦合性,即使从其他动态配置中心迁移过来改动也更小

hujun-w-2 added a commit that referenced this issue May 9, 2024
* fix the thread-safety problem in NacosConfigurationPropertiesBinder (#268)

* 新增服务端配置更改后spring注解@value值动态变更功能

---------

Co-authored-by: realJackSun <sjtusl@163.com>
Co-authored-by: 胡俊 <510830970@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants