-
Notifications
You must be signed in to change notification settings - Fork 310
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 $符号异常 #293
Comments
请问什么时候能修复,也遇到了同样的问题 |
正常情况下,配置内容包含$也是为了引用配置中的另一个值吧?还有配置内容本身就抱哈$的吗 |
这种情况可以把配置内容中的$换成 \$ |
感谢答复,我试配置内容本身就包含$,我试了一下换成 |
我想说的就是换成 |
启动应用读取配置,和使用@NacosValue刷新配置,读取规则不一样,导致使用 |
String spelExpr = nacosValueExpr.replaceAll("\$\{" + key + PLACEHOLDER_SUFFIX, Matcher.quoteReplacement(newValue)); |
Co-authored-by: huijun.xu <[email protected]> Co-authored-by: 胡俊 <[email protected]>
nacos-spring-project/nacos-spring-context/src/main/java/com/alibaba/nacos/spring/context/annotation/config/NacosValueAnnotationBeanPostProcessor.java
Line 184 in 00072db
如果配置的value中包含$符号,String.replaceAll()会抛出异常,导致配置无法更新
The text was updated successfully, but these errors were encountered: