spring配置多个PropertyPlaceholderConfigurer

在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)