Spring配置中从外部文件加载多个properties文件

来源:互联网 发布:淘宝买家修改评价链接 编辑:程序博客网 时间:2024/06/03 14:47

方式一:

<context:property-placeholder location="classpath:resources/jdbc.properties,classpath:/resources/redis.properties"/>

方式二:

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


阅读全文
0 0
原创粉丝点击