解决 IllegalArgumentException: Could not resolve placeholder in string value "${XXXXXX}"
来源:互联网 发布:vcm仿真实验软件 编辑:程序博客网 时间:2024/06/06 10:40
解决
如题:
导致这一问题的原因:使用了重复的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" />
阅读全文
0 0
- 解决 IllegalArgumentException: Could not resolve placeholder in string value "${XXXXXX}"
- 解决 IllegalArgumentException: Could not resolve placeholder in string value "${XXXXXX}"
- $Value{}ntException: Could not resolve placeholder 'KEY' in string value "${
- Could not resolve placeholder 'driverClassName' in string value "${driverClassName}"
- Could not resolve placeholder 'CUST_INDUSTORY' in string value "${CUST_INDUSTORY}"
- Could not resolve placeholder 'driver' in string value "${driver}"
- Could not resolve placeholder 'driverClasss' in string value "${driverClasss}"
- 解决 Could not resolve placeholder 'some.var.name' in string value
- Could not resolve placeholder 'jdbc.driverClassName' in string value "${jdbc.driverClassName}
- Could not resolve placeholder 'master.jdbc.url' in string value "${master.jdbc.url}"
- Could not resolve placeholder 'spring.security.mapping.directory' in string value "${spring.security
- Could not resolve placeholder 'jdbc.username' in string value "${jdbc.username}"
- Could not resolve placeholder 'jdbc.url' in string value "${jdbc.url}"
- 报错Could not resolve placeholder 'jdbc.driverClassName' in string value "${jdbc.driverClassName}
- Could not resolve placeholder 'redis.pool.maxTotal' in string value "${redis.pool.maxTotal}"
- Could not resolve placeholder 'jdbc.driverClassName' in string value "${jdbc.driverClassName}错误
- 错误笔记之Could not resolve placeholder 'jdbc.driver' in string value "${jdbc.driver}"
- spring cloud config---Could not resolve placeholder 'foo' in string value "${foo}"
- hadoop中的Configuration对象和FilSystem是什么有什么用?
- 如何自动唤醒和关闭 Linux
- 如何判断 Linux 服务器是否被入侵?
- java -- 初识集合
- 【每日安全资讯】Satori(觉醒)新僵尸网络出现,在过去的12个小时内已经激活超过28万个不同的IP
- 解决 IllegalArgumentException: Could not resolve placeholder in string value "${XXXXXX}"
- 使用 groff 编写 man 手册页
- 本地yum源配置
- Python从入门到精通
- 英文版ubuntu14.04安装ssh和ftp
- 【每日安全资讯】5500 个 WordPress 网站发现按键记录器
- 在 Linux 启动或重启时执行命令与脚本
- 【每日安全资讯】男女密码大不同:男常用“password” 女偏好爱人姓名
- 哈理工oj 2080链表 【贪心】