Skip to content

Documentation enhancement for @ConditionalOnMissingBean #9387

@jhyot

Description

@jhyot

I noticed that it is nowhere documented that @ConditionalOnMissingBean without any further parameters checks for the return type of the annotated method. I had to dig into the code to verify that.

I propose adding this fact to the Javadoc and maybe to the docs, since this is actually probably the most widely used form of the conditional.
https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-developing-auto-configuration.html#boot-features-bean-conditions

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions