1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > 解决 Could not resolve placeholder ‘xxx‘ in string value “${xxx}“

解决 Could not resolve placeholder ‘xxx‘ in string value “${xxx}“

时间:2020-05-10 01:52:04

相关推荐

解决 Could not resolve placeholder ‘xxx‘ in string value “${xxx}“

这个其实也算是个小问题,就是拿来记录一下。

原文地址:/u012198209/article/details/88965922

一般来说报Could not resolve placeholder ‘xxx’ in string value “${xxx}” 错误的原因都是由于项目中有多个地方的xml文件中用到了

<context:property-placeholder location=“classpath:xxx.properties”/>

或者是

来引入配置文件,这时需要在这两条配置后分别加上

ignore-unresolvable="true"

p:ignoreUnresolvablePlaceholders="true"

来防止程序不能识别配置属性。

也就是

<context:property-placeholder location="classpath:xxx.properties" ignore-unresolvable="true"/>

<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" p:ignoreUnresolvablePlaceholders="true">

这样应该就行了

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。