首页 > 编程语言 > 详细

spring载入外部配置文件的方法

时间:2015-11-12 11:20:08      阅读:229      评论:0      收藏:0      [点我收藏+]
<bean class=“org.springframework.beans.factory.config.PropertyPlaceholderConfigurer“>
       <property name=“locations“>
              <value>classpath:xxx.properties</value>
       </property>
</bean>

或者

<context:Property-Placeholderlocation=”classpath:xxx.properties”/>

接下来就可以在Bean或者XML用{xxx}的方式调用了

spring载入外部配置文件的方法

原文:http://www.cnblogs.com/dycg/p/4958015.html

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