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. mac 安装配置使用 mongoldb

    mac 安装配置使用 mongoldb 安装和配置 brew install mongos brew install mongo # 密码就是用户的密码 # 配置数据文件 //如果不配置会出现错误62 ...

  2. The packaging for this project did not assign a file to the build artifact

    当进行mvn install时,遇到以下错误 The packaging for this project did not assign a file to the build artifact 在网 ...

  3. ultis, BIT(x), BITCOUNT(x)

    /* http://resnet.uoregon.edu/~gurney_j/jmpc/bitwise.html */ #define BITCOUNT(x) (((BX_(x)+(BX_(x)> ...

  4. PAT_A1064#Complete Binary Search Tree

    Source: PAT A1064 Complete Binary Search Tree (30 分) Description: A Binary Search Tree (BST) is recu ...

  5. 文本数据和mysql 里面的数据比较

    实现读取TXT文件中的内容然后存到内存,然后将内存中的数据和mysql 数据库里面某张表数据的字段做一个比较,如果比较内存中的数据在mysql 里存在则不做处理,如果不存在则将该数据插入mysql数据 ...

  6. fastReport.net 初了解

    delphi 中fastReport rmReport都很好用,转到.net了,第一想法也是这两个,好在这里有个fastReport; 这个安装呢 找个破解的 有个4.x版 安完建一个winForm  ...

  7. 18-MySQL-Ubuntu-数据表的查询-连接(七)

    students与classes表,两个表的连接字段是students.cls_id=classes.ID (1) 左连接:left join on 左边表全取,右边表取共有的,没有的为null se ...

  8. 基于Mina的Http Server以及简单的Http请求客户端

    目的:    Java平台下的内部组件之间的通信.    1.WebService 由于感觉本身Java平台下的Web Service标准就不够统一,相互之间的调用就会有一些问题,更不用说与.net等 ...

  9. mysql 监控及优化——转载自http://www.cnblogs.com/suansuan/

    1.Mysql连接数 Mysql默认最大连接数为100. 设置Mysql的最大连接数,在Mysql的配置文件中增加: max_connections = 1000   #Mysql的最大连接数,默认如 ...

  10. day22 yield的表达式的应用,面向过程编程,内置函数前几个

    Python之路,Day10 = Python基础10 生成器表达式: (i for i in range(10) if i > 5)os.walk(r'文件路径')返回一个迭代器, 第一次ne ...