<bean id="configProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="locations">
<list>
<value>classpath:common.properties</value>
<value>classpath:dev-config.properties</value>
</list>
</property>
</bean><context:property-placeholder location="classpath:db.properties"/>
本文展示了一个使用Spring框架加载配置文件的例子。通过定义bean来指定加载common.properties和dev-config.properties两个配置文件,并使用context:property-placeholder来加载db.properties。
1372

被折叠的 条评论
为什么被折叠?



