-
Notifications
You must be signed in to change notification settings - Fork 38.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use the field name as a fallback qualifier for Bean Overriding
This commit harmonizes how a candidate bean definition is determined for overriding using `@TestBean`, `@MockitoBean`, and `@MockitoSpyBean`. Previously, a qualifier was necessary even if the name of the annotated field matches the name of a candidate. After this commit, such candidate will be picked up transparently, the same it is done for regular autowiring. This commit also reviews the documentation of the feature as considering the field means that its name is taken into account to compute a cache key if by-type lookup is requested. Closes gh-32939
- Loading branch information
Showing
10 changed files
with
357 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.