Skip to content

Commit

Permalink
Improve javadoc for when bean type to match is inferred
Browse files Browse the repository at this point in the history
Closes gh-42504
  • Loading branch information
wilkinsona committed Oct 3, 2024
1 parent c88a2dc commit 2328c1f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -24,6 +24,7 @@
import java.lang.annotation.Target;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;

/**
Expand All @@ -32,8 +33,9 @@
* must be met for the condition to match, but they do not have to be met by the same
* bean.
* <p>
* 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},
* or {@link #name} has been specified, the bean type to match defaults to the return type
* of the {@code @Bean} method:
*
* <pre class="code">
* &#064;Configuration
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2021 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -24,6 +24,7 @@
import java.lang.annotation.Target;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;

/**
Expand All @@ -32,8 +33,9 @@
* must be met for the condition to match and the requirements do not have to be met by
* the same bean.
* <p>
* 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},
* or {@link #name} has been specified, the bean type to match defaults to the return type
* of the {@code @Bean} method:
*
* <pre class="code">
* &#064;Configuration
Expand Down

0 comments on commit 2328c1f

Please sign in to comment.