If I have PropertyPlaceholderConfigurergoing through an XML file, is it possible to use its Spring @Configurationas a property source for all the beans that it processes?
@Configuration
@ComponentScan(value = { "x.y.z })
@ImportResource({ "classpath:remote-properties/applicationContext.xml",})
public class CoreConfiguration implements TransactionManagementConfigurer {
@Resource(name = "com.c.h.c.PropertyPlaceholderConfigurer")
public PropertyPlaceholderConfigurer pp;
@Bean
public PropertyPlaceholderConfigurer propertiesFactoryBean() {
return pp;
}
}
With the above, he never hits a breakpoint on pp. If I remove the @Beanmethod, I can check what is populating pp. So how can I register it using the configuration?
source
share