解决 IllegalArgumentException: Could not resolve placeholder in string value "${XXXXXX}"
解决 string in not quot value could resolve
2023-09-11 14:16:54 时间
如题:
导致这一问题的原因:使用了重复的property-placeholder
如一个配置文件中使用了
<context:property-placeholder location="classpath:aa.properties" />
而另一处使用了
<bean id="propertyConfigurer"> <!--class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">--> <property name="locations">--> <list> <value>classpath:bb.properties</value> </list> </property> </bean>
解决:
主要从以下几个地方去解决:
1. 去掉一处的propertyConfigurer配置,替换成context:property-placeholder
2. 两处都添加ignore-unresolvable="true"
配置文件1:
<context:property-placeholder location="classpath:aa.properties" ignore-unresolvable="true" />
配置文件2:
<context:property-placeholder location="classpath:bb.properties" ignore-unresolvable="true" />
相关文章
- 解决 IE6 IE7 onresize的bug
- C#基础知识系列一(goto、i++、三元运算符、ref和out、String和string、重载运算符)
- 系统架构面临的三大挑战,看 Kubernetes 监控如何解决?
- 1,字符是否为空,2,比较两个字符大小。String.Compare(String, String)。string.IsNullOrEmpty(string)
- 【RF库测试】Encode String To Bytes&Decode Bytes To String& should be string&should be unicode string &should not be string
- 三星手机熄屏时显示 - 未选中图片应该如何解决
- Atitit 命令行dsl传递参数的几种模式对比 cli url模式 键值对NameValuePair urlutil String string = " -host 101.13
- Atitit.url 汉字中文路径 404 resin4 resin 解决 v2 q329
- paip.python错误解决2
- Matlab:成功解决In an assignment A(I)=B,the number of elements in B and I must be the same
- 成功解决CatBoostError: Invalid type for cat_feature cat_features must be integer or string, real number
- 成功解决ValueError: fill value must be in categories
- 成功解决ValueError: could not convert string to float: ‘N‘
- 成功解决NotFoundError (see above for traceback): Failed to create a directory: ; No such file or directo
- 已解决CondaValueError: Malformed version string ‘~’: invalid character(s)
- 已解决TypeError: eval() arg 1 must be a string, bytes or code object
- 已解决TypeError: string indices must be integers
- 已解决SQL错误(208):对象名‘STRING_SPLIT‘无效。
- 已解决FutureWarning: The default value of regex will change from True to False in a future version. In
- 教你如何解决JS/TS里特定String进行拆分然后遍历各个元素
- 【报错解决】Python re模块 sub函数 :Error expected string or bytes-like object
- Springboot问题解决:javax.servlet.ServletException: Circular view path [login]: would dispatch...
- 解决 No converter found capable of converting from type [java.lang.String] to type ... 的问题
- IE6下position:fixed不支持问题及其解决方式
- 阿里旺旺调用谷歌Chrome浏览器打不开网页崩溃了显示错误代码 RESULT_CODE_MISSING_DATA-完美解决