all and sundry: Spring @Bean and PropertyPlaceHolderConfigurer
The reason for the issue it turns out, is that with @Configuration which internally uses annotations like @Autowired, @Value, and @PostConstruct, any BeanFactoryPostProcessor beans have to be declared with a static, modifier. Otherwise the containing @Configuration class is instantiated very early and the BeanPostProcessors responsible for resolving annotations like @Value, @Autowired etc, cannot act on it.Read full article from all and sundry: Spring @Bean and PropertyPlaceHolderConfigurer
No comments:
Post a Comment