<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<!--classpath是Spring约定的-->
<value>classpath:jdbc.properties</value>
<!--这里可以加入多个属性文件-->
</list>
</property>
</bean>
本文介绍如何使用Spring框架的PropertyPlaceholderConfigurer来加载外部属性文件。通过示例代码展示了如何指定要加载的属性文件路径,并说明了可以通过这种方式加载多个属性文件。
9734

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



