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
The text was updated successfully, but these errors were encountered:
zhoujinsy
changed the title
@NacosValue的autoRefreshed监听value中包含"$"的配置条目会导致autoRefreshed功能失效
通过@NacosValue autoRefreshed监听配置条目中如果value包含"$"可能会导致autoRefreshed功能失效
Dec 29, 2023
zhoujinsy
changed the title
通过@NacosValue autoRefreshed监听配置条目中如果value包含"$"可能会导致autoRefreshed功能失效
通过@NacosValue autoRefreshed监听配置条目如果value包含"$"可能会导致autoRefreshed功能失效
Dec 29, 2023
Issue Description
问题版本:问题发现版本nacos-spring-context-1.1.1.jar, 目前最新的release版本为nacos-spring-context-1.1.2.jar问题仍存在
问题表现: 系统启动后, 配置了@NacosValue autoRefresh的nacos 配置条目有固定次数配置变更无法autoRefresh
Describe what happened (or what feature you want)
3 复现方法
3.1 nacos中新建application.properties文件, 录入如下配置
demoConfigItem0=qtest0
demoConfigItem1={"password":"(.*password):|=(?!ENC[(][a-zA-Z0-9]+[)])(?![$][{].+[}])(.+)"}
demoConfigItem2=dtest2
demoConfigItem3=atest3
demoConfigItem4=pre,prod,green
3.2 在bean中监听所有的配置条目, 启动服务
3.3 将上述配置改为
demoConfigItem0=qtest+c0
demoConfigItem1={"password":"(.*password):|=(?!ENC[(][a-zA-Z0-9]+[)])(?![$][{].+[}])(.+)"}
demoConfigItem2=dtest2+c2
demoConfigItem3=atest3+c3
demoConfigItem4=pre,prod,green+c4
可以看到, 只有部分key能刷新成功
3.4 再次将上述配置改为
demoConfigItem0=qtest+c0+c01
demoConfigItem1={"password":"(.*password):|=(?!ENC[(][a-zA-Z0-9]+[)])(?![$][{].+[}])(.+)"}
demoConfigItem2=dtest2+c2+c21
demoConfigItem3=atest3+c3+c31
demoConfigItem4=pre,prod,green+c4+c41
可以看到,所有key都能能刷新成功
3.5 再次将上述配置改为
demoConfigItem0=qtest+c0+c01+c02
demoConfigItem1={"password":"(.*password):|=(?!ENC[(][a-zA-Z0-9]+[)])(?![$][{].+[}])(.+)"}+c12
demoConfigItem2=dtest2+c2+c21+c22
demoConfigItem3=atest3+c3+c31+c32
demoConfigItem4=pre,prod,green+c4+c41+c42
可以看到,所有key均刷新不成功
Describe what you expected to happen
How to reproduce it (as minimally and precisely as possible)
在NacosValueAnnotationBeanPostProcessor类的下图位置进行try catch, 输出error日志
The text was updated successfully, but these errors were encountered: