单个配置:

<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
  <property name="location">
    <value>classpath:jdbc.properties</value>
  </property>
</bean>

多个配置:

<!-- 将多个配置文件读取到容器中,交给Spring管理 -->

<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
  <property name="locations">
    <list>
      <!-- 这里支持多种寻址方式:classpath和file -->
      <value>classpath:/opt/demo/config/demo-db.properties</value>
       <!-- 推荐使用file的方式引入,这样可以将配置和代码分离 -->
      <value>file:/opt/demo/config/demo-mq.properties</value>
      <value>file:/opt/demo/config/demo-remote.properties</value>
    </list>
  </property>
</bean>

最新文章

  1. 【原创】js中input type=file的一些问题
  2. 对COM 组件的调用返回了错误 HRESULT E_FAIL
  3. php 多条数据更新
  4. UrlRewrite伪静态
  5. python sort和sorted的区别以及使用方法
  6. iOS加载程序视图的方式
  7. linux系统中删除文件夹
  8. js JSONP实例
  9. CODEVS 3138 栈练习2
  10. The Frog&#39;s Games(二分)
  11. hdu Hat&#39;s Fibonacci
  12. 纯Jquery前端分页
  13. 荣获MVP感想
  14. python自动化运维七:fabric
  15. day47-python爬虫学习二
  16. 如何将vue/html在Hbuilder里进行apk打包封装生成直接可用程序
  17. componentWillMount和componentDidMount的区别
  18. MikroTik RouterOS授权级别
  19. 浙江工业大学校赛 小M和天平
  20. 修改MySQL数据库中表和表中字段的编码方式的方法

热门文章

  1. SqlServer分区表概述(转载)
  2. 单点登录 SSO 的实现原理
  3. TextView,EditText中添加不同颜色的文字
  4. 给tabBar设置图片和字体颜色的几种方法
  5. border:0; VS border:none;
  6. 再谈Bellman-Ford
  7. FreeSWITCH无法读取wav文件
  8. Java与JavaScript的区别
  9. 用Dictionary替换switch case
  10. 类似\u4e0b\u6ce8\u903e\u65f6解码