Skip to content

Spring-boot 1, warning about bean creation - CacheOrGroupedOpenApiCondition  #689

Closed
@lrozenblyum

Description

@lrozenblyum

Describe the bug
The logs of start-up contain a warning

ConfigurationClassEnhancer - @Bean method SpringDocConfiguration.springdocBeanFactoryPostProcessor2 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.

To Reproduce
Spring Boot OpenApi 1.3.9
Spring Boot 1.5.13.RELEASE
Boot the app.

Expected behavior

  • No warnings in logs due to beans definitions

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions