Support field name as fallback qualifier for @TestBean
, MockitoBean
, and MockitoSpyBean
#32939
Labels
Milestone
@TestBean
, MockitoBean
, and MockitoSpyBean
#32939
@Qualifier
support was recently added for@TestBean
,MockitoBean
, andMockitoSpyBean
fields; however, when the name of the annotated field exactly matches the name of the bean being overridden or spied the field name is not currently used as a fallback qualifier, in contrast to regular injection points (such as@Autowired
fields).For example, the following currently only passes with the presence of
@Qualifier("exampleService")
.Whereas, ideally we should be able to remove
@Qualifier("exampleService")
and have the field name ("exampleService") be used as the fallback qualifier.The text was updated successfully, but these errors were encountered: