Java 类org.springframework.beans.factory.config.PropertyResourceConfigurer 实例源码

项目:spring-component-framework    文件:ContextUtils.java   
/**
 * 继承上级上下文中的属性配置器
 *
 * @param inheriting  上级上下文
 * @param context 当前上下文
 */
public static void inheritParentProperties(ApplicationContext inheriting,
                                           GenericApplicationContext context) {
    if (!(inheriting instanceof AbstractApplicationContext)) return;
    List<BeanFactoryPostProcessor> processors =
            ((AbstractApplicationContext) inheriting).getBeanFactoryPostProcessors();
    for (BeanFactoryPostProcessor processor : processors) {
        if (processor instanceof PropertyResourceConfigurer)
            context.addBeanFactoryPostProcessor(processor);
    }
}
项目:cloudbreak    文件:IntegrationTestConfiguration.java   
@Bean
public static PropertyResourceConfigurer propertySourcesPlaceholderConfigurer() {
    return new PropertySourcesPlaceholderConfigurer();
}
项目:cloudbreak    文件:TestConfig.java   
@Bean
public static PropertyResourceConfigurer propertyResourceConfigurer() {
    return new PropertySourcesPlaceholderConfigurer();
}