List of usage examples for org.springframework.context.support PropertySourcesPlaceholderConfigurer PropertySourcesPlaceholderConfigurer
PropertySourcesPlaceholderConfigurer
From source file:org.jgrades.data.context.DataContext.java
@Bean public static PropertySourcesPlaceholderConfigurer propertyConfig() { PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer = new PropertySourcesPlaceholderConfigurer(); return propertySourcesPlaceholderConfigurer; }
From source file:org.springframework.xd.module.CompositeModule.java
private void initContext() { Assert.state(context != null, "An ApplicationContext is required"); boolean propertyConfigurerPresent = false; for (String name : context.getBeanDefinitionNames()) { if (name.startsWith("org.springframework.context.support.PropertySourcesPlaceholderConfigurer")) { propertyConfigurerPresent = true; break; }/*from w ww .j ava 2 s . c om*/ } if (!propertyConfigurerPresent) { PropertySourcesPlaceholderConfigurer placeholderConfigurer = new PropertySourcesPlaceholderConfigurer(); placeholderConfigurer.setEnvironment(context.getEnvironment()); context.addBeanFactoryPostProcessor(placeholderConfigurer); } context.setId(this.toString()); context.refresh(); }