-
Notifications
You must be signed in to change notification settings - Fork 310
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
配置项value $符号异常 #293
Labels
question
Further information is requested
Comments
请问什么时候能修复,也遇到了同样的问题 |
正常情况下,配置内容包含$也是为了引用配置中的另一个值吧?还有配置内容本身就抱哈$的吗 |
这种情况可以把配置内容中的$换成 \$ |
感谢答复,我试配置内容本身就包含$,我试了一下换成 |
我想说的就是换成 |
启动应用读取配置,和使用@NacosValue刷新配置,读取规则不一样,导致使用 |
String spelExpr = nacosValueExpr.replaceAll("\$\{" + key + PLACEHOLDER_SUFFIX, Matcher.quoteReplacement(newValue)); |
codestagea
pushed a commit
to codestagea/nacos-spring-project
that referenced
this issue
Aug 10, 2023
Merged
hujun-w-2
added a commit
that referenced
this issue
May 9, 2024
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
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: