Skip to content

@ConditionalOn(Missing)Bean(annotation = …) infers the type to match when used on a @Bean method #42484

@sdeeg

Description

@sdeeg

Bug report

We’ve been running into an issue with the @ConditionalOnBean(annotation = XXX) annotation with Spring Boot. It seems that the conditional doesn’t work if the bean with the conditional is the only bean of that type being registered. Attached is a sample project to demonstrate.

spring-boot-conditional-annotation.tar.gz

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions