org.apache.commons.configuration.XMLConfiguration 可以用来读取和写入 xml 文件
这样可以把 xml 读到 PropertyPlaceholderConfigurer 里面
<!-- Composite configuration -->
<bean id="configuration" class="org.springmodules.commons.configuration.CommonsConfigurationFactoryBean">
<property name="configurations">
<list>
<!-- User specifics -->
<bean class="org.apache.commons.configuration.XMLConfiguration">
<constructor-arg type="java.net.URL" value="file:cfg.xml" />
</bean>
</list>
</property>
</bean>
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="properties" ref="configuration"/>
</bean>