在spring中配置多个PropertyPlaceholderConfigurer的用法如下
<bean id="placer1" class="org.springframework.beans.factory.config.PreferencesPlaceholderConfigurer">
<property name="order" value="1"></property>
<property name="ignoreUnresolvablePlaceholders" value="true" />
<property name="locations">
<list>
<value>classpath:/jboss.properties</value>
</list>
</property>
</bean>
<bean id="placer2" class="org.springframework.beans.factory.config.PreferencesPlaceholderConfigurer">
<property name="order" value="2"></property>
<property name="ignoreUnresolvablePlaceholders" value="true" />
<property name="locations">
<list>
<value>classpath:/jdbc.properties</value>
</list>
</property>
</bean>
Spring中配置多个PropertyPlaceholderConfigurer的方法详解
本文详细介绍了在Spring框架中配置多个PropertyPlaceholderConfigurer的步骤和注意事项,包括bean的定义、属性设置以及资源文件的引用。通过实例演示了如何实现灵活的属性注入和配置管理。
811

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



