1、基本的使用方法是
<bean id="propertyConfigurerForWZ" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> 
    <property name="location"> 
        <value>classpath:/spring/properties/jdbc.properties</value> 
    </property>

</bean>
2、当存在多个Properties文件时
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> 
    <property name="locations"> 
       <list> 
          <value>classpath:/spring/properties/jdbc.properties</value> 
          <value>/WEB-INF/conf/spring/system.properties</value> 
        </list> 
    </property>

</bean> 
3、多个PropertyPlaceholderConfigurer要通过order属性指明加载顺序  
<bean id="propertyConfigurerForWZ" class="org.springframework.beans.factory.

config.PropertyPlaceholderConfigurer"> 
     <property name="order" value="1" /> 
    <property name="ignoreUnresolvablePlaceholders" value="true" /> 
    <property name="location"> 
       <value>classpath:/spring/include/dbQuery.properties</value> 
    </property> 
</bean>
 <bean id="propertyConfigurerForWZ" class="org.springframework.beans.factory.
config.PropertyPlaceholderConfigurer"> 
     <property name="order" value="2" /> 
    <property name="ignoreUnresolvablePlaceholders" value="true" /> 
    <property name="location"> 
       <value>classpath:/spring/include/dubbo.properties</value> 
    </property> 
</bean>

PropertyPlaceholderConfigurer的注意事项的更多相关文章

  1. PropertyPlaceholderConfigurer使用及@Value使用注意事项

    思考 PropertyPlaceholderConfigurer和<context:property-placeholder/>有何区别? @Value在Controller层和Servi ...

  2. Spring 后置处理器 PropertyPlaceholderConfigurer 类(引用外部文件)

    一.PropertyPlaceholderConfigurer类的作用 PropertyPlaceholderConfigurer 是 BeanFactory 后置处理器的实现,也是 BeanFact ...

  3. activemq消息队列的使用及应用docker部署常见问题及注意事项

    activemq消息队列的使用及应用docker部署常见问题及注意事项 docker用https://hub.docker.com/r/rmohr/activemq/配置在/data/docker/a ...

  4. Spring PropertyPlaceholderConfigurer 自定义扩展

    原文地址:https://blog.csdn.net/feiyu8607/article/details/8282893 Spring中PropertyPlaceholderConfigurer这个类 ...

  5. jQuery UI resizable使用注意事项、实时等比例拉伸及你不知道的技巧

    这篇文章总结的是我在使用resizable插件的过程中,遇到的问题及变通应用的奇思妙想. 一.resizable使用注意事项 以下是我在jsfiddle上写的测试demo:http://jsfiddl ...

  6. Windows Server 2012 NIC Teaming介绍及注意事项

    Windows Server 2012 NIC Teaming介绍及注意事项 转载自:http://www.it165.net/os/html/201303/4799.html Windows Ser ...

  7. TODO:Golang指针使用注意事项

    TODO:Golang指针使用注意事项 先来看简单的例子1: 输出: 1 1 例子2: 输出: 1 3 例子1是使用值传递,Add方法不会做任何改变:例子2是使用指针传递,会改变地址,从而改变地址. ...

  8. app开发外包注意事项,2017最新资讯

    我们见过很多创业者,栽在这app外包上.很多创业者对于app外包这件事情不是特别重视,以为将事情交给app外包公司就完事了,实际上不是的.无论是从选择app外包公司还是签订合同.售后维护等各方面都有许 ...

  9. favicon.ioc使用以及注意事项

    1.效果 2.使用引入方法 2.1 注意事项:(把图标命名为favicon.ico,并且放在根目录下,同时使用Link标签,多重保险) 浏览器默认使用根目录下的favicon.ico 图标(如果你并没 ...

随机推荐

  1. 使用VC6.0编译C++代码的时候报错:fatal error C1071: unexpected end of file found in comment(Mark ZZ)

    fatal error C1071: unexpected end of file found in comment(Mark ZZ) 今天在一论坛上看到一人发帖: 『最近遇到一个奇怪的问题,代码中的 ...

  2. JZOJ5143:无心行挽

    Description “What’s left to do when we’ve lost all hope?”“若内心万念俱灰,是否注定无心行挽?”------来自网易云音乐<Golden ...

  3. NX二次开发-UFUN信息窗口打印UF_UI_write_listing_window

    NX9+VS2012 #include <uf.h> #include <uf_ui.h> UF_initialize(); //方法1(uc1601) uc1601();// ...

  4. Css实现Div在页面上垂直居中显示

    方法一 <html>    <head>        <title>垂直居中</title>        <style type=" ...

  5. Fedora Linux 安装Qt5.2.0

    1.下载 qt-linux-opensource-5.2.0-x86-offline.run 2. chmod u+x ./qt-linux-opensource-5.2.0-x86-offline. ...

  6. 用注册表创建无法删除的IE快捷方式

    代码如下: Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE/SOFTWARE/Classes/CLSID/{98745625-1234 ...

  7. LeetCode 2. Add Two Numbers (两数相加)

    题目标签:Linked List, Math 题目给了我们两个 Linked List, 各代表一个数字,不过顺序的反的.让我们把两个数字相加. 和普通的相加其实差不多,只不过变成了 Linked L ...

  8. 6、 restful API

    RESTful 一种软件架构风格.设计风格,而不是标准,只是提供了一组设计原则和约束条件.它主要用于客户端和服务器交互类的软件.基于这个风格设计的软件可以更简洁,更有层次,更易于实现缓存等机制. RE ...

  9. C#标准的事件模型

    事件模型的几个规范: 委托类型的名称以EventHandler结束: 委托原型返回值为void; 委托原型具有两个参数:sender表示事件触发者,e表示事件参数: 事件参数的名称以EventArgs ...

  10. ps-手捧城堡滴水云雾图

    1打开背景图 置入第二张图片 栅格化-加入蒙版-渐变 置入第三张图片 栅格化-用快速选择工具选取-加入蒙版 置入第四张图片 栅格化-调整图层-点击城堡建立蒙版-点击手的蒙版 ctrl-点击城堡的蒙版- ...