Skip to content

Commit 7b4cd03

Browse files
committed
Merge branch '3.2.x' into 3.3.x
Closes gh-42505
2 parents 93e5b3a + 2328c1f commit 7b4cd03

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionalOnBean.java

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2022 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -24,6 +24,7 @@
2424
import java.lang.annotation.Target;
2525

2626
import org.springframework.beans.factory.BeanFactory;
27+
import org.springframework.context.annotation.Bean;
2728
import org.springframework.context.annotation.Conditional;
2829

2930
/**
@@ -32,8 +33,9 @@
3233
* must be met for the condition to match, but they do not have to be met by the same
3334
* bean.
3435
* <p>
35-
* When placed on a {@code @Bean} method, the bean class defaults to the return type of
36-
* the factory method:
36+
* When placed on a {@link Bean @Bean} method and none of {@link #value}, {@link #type},
37+
* or {@link #name} has been specified, the bean type to match defaults to the return type
38+
* of the {@code @Bean} method:
3739
*
3840
* <pre class="code">
3941
* &#064;Configuration

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionalOnMissingBean.java

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2021 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -24,6 +24,7 @@
2424
import java.lang.annotation.Target;
2525

2626
import org.springframework.beans.factory.BeanFactory;
27+
import org.springframework.context.annotation.Bean;
2728
import org.springframework.context.annotation.Conditional;
2829

2930
/**
@@ -32,8 +33,9 @@
3233
* must be met for the condition to match and the requirements do not have to be met by
3334
* the same bean.
3435
* <p>
35-
* When placed on a {@code @Bean} method, the bean class defaults to the return type of
36-
* the factory method:
36+
* When placed on a {@link Bean @Bean} method and none of {@link #value}, {@link #type},
37+
* or {@link #name} has been specified, the bean type to match defaults to the return type
38+
* of the {@code @Bean} method:
3739
*
3840
* <pre class="code">
3941
* &#064;Configuration

0 commit comments

Comments
 (0)