1:PropertyPlaceholderConfigurer 和PropertyOverrideConfigurer 都是FactoryPostProcessor的实现 ;
2:PropertyOverrideConfigurer 与前者区别在于如果多个属性文件有相同属性 后面会替代前者;
3:配置方式(1):
<context:property-override location="classpath:override.properties"/>
(2)<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="locations"> <value>classpath:com/foo/strategy.properties</value> </property> <property name="properties"> <value>custom.strategy.class=com.foo.DefaultStrategy</value> </property> </bean>