Class org.springframework.context.annotation.ConfigurationClassAndBFPPTests

3

tests

0

failures

0

ignored

0.065s

duration

100%

successful

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.