spring注入Properties

最近项目中向将某个Properties注入到Bean中,经百度知以下代码.

<bean id="settings"   
   class="org.springframework.beans.factory.config.PropertiesFactoryBean">  
   <property name="locations">  
  <list>  
    <value>file:/opt/rms/config/rms-mq.properties</value>  
    <value>file:/opt/rms/config/rms-env.properties</value>  
  </list>  
   </property>  
 </bean>  
</beans> 

===
记录备忘

posted @ 2015-10-28 16:26  爪哇公民  阅读(139)  评论(0编辑  收藏  举报