diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionalOnBean.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionalOnBean.java index 3256c97795c..fad856c3f9c 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionalOnBean.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionalOnBean.java @@ -35,8 +35,9 @@ import org.springframework.context.annotation.Conditional; * must be met for the condition to match, but they do not have to be met by the same * bean. *
- * When placed on a {@code @Bean} method, the bean class defaults to the return type of - * the factory method: + * When placed on a {@link Bean @Bean} method and none of {@link #value}, {@link #type}, + * {@link #name}, or {@link #annotation} has been specified, the bean type to match + * defaults to the return type of the {@code @Bean} method: * *
* @Configuration diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionalOnMissingBean.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionalOnMissingBean.java index be71a1adaca..76245b82ef0 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionalOnMissingBean.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionalOnMissingBean.java @@ -35,8 +35,9 @@ import org.springframework.context.annotation.Conditional; * must be met for the condition to match and the requirements do not have to be met by * the same bean. *- * When placed on a {@code @Bean} method, the bean class defaults to the return type of - * the factory method: + * When placed on a {@link Bean @Bean} method and none of {@link #value}, {@link #type}, + * {@link #name}, or {@link #annotation} has been specified, the bean type to match + * defaults to the return type of the {@code @Bean} method: * *
* @Configuration