Class org.springframework.context.annotation.ConfigurationClassAndBFPPTests
Tests
| Test |
Duration |
Result |
| autowiringFailsWithBFPPAsInstanceMethod |
0.023s |
passed |
| autowiringSucceedsWithBFPPAsStaticMethod |
0.030s |
passed |
| staticBeanMethodsDoNotRespectScoping |
0.012s |
passed |
Standard output
16:45:36.617 [Test worker] WARN org.springframework.context.annotation.ConfigurationClassEnhancer - @Bean method AutowiredConfigWithBFPPAsInstanceMethod.bfpp is non-static and returns an object assignable to Spring's BeanFactoryPostProcessor interface. This will result in a failure to process annotations such as @Autowired, @Resource and @PostConstruct within the method's declaring @Configuration class. Add the 'static' modifier to this method to avoid these container lifecycle issues; see @Bean javadoc for complete details.