首页 > 移动平台 > 详细

在application-context.xml中配置多个property-placeholder

时间:2017-09-10 18:13:48      阅读:336      评论:0      收藏:0      [点我收藏+]

如下所示,直接写多个<context:property-placeholder>标签是会报错的。

    <context:property-placeholder location="classpath:wechat/official-account.properties" />
    <context:property-placeholder location="classpath:db.properties" />

 

即便是写在不同的xml里面,只要最终被application-context.xml的<import>标签所引入,都是会报错了。

正确的做法追加一个ignore-unresolvable属性,每个property-placeholder都需要加。

    <context:property-placeholder location="classpath:wechat/official-account.properties" ignore-unresolvable="true" />
    <context:property-placeholder location="classpath:db.properties" ignore-unresolvable="true" />

 

在application-context.xml中配置多个property-placeholder

原文:http://www.cnblogs.com/deolin/p/7501678.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!