spring-boot/spring-boot-test
Andy Wilkinson 70e802fba5 Use name from @SpyBean to disambiguate multiple candidates
Previously, @SpyBean's name attribute was not used when determining
the name of the bean to spy upon. When there were multiple candidates,
none of which were primary, this would lead to a failure to find the
bean to spy upon. This behaviour is also inconsistent with @MockBean
which does use the name attribute to identify the bean to mock.

This commit updates MockitoPostProcessor to use the name attribute,
when set, to identify the bean that should be spied upon. For
consistency with @MockBean it is always used when set. When not set
the previous logic will continue to be used.

Closes gh-8315
2017-02-21 20:19:50 +00:00
..
src Use name from @SpyBean to disambiguate multiple candidates 2017-02-21 20:19:50 +00:00
pom.xml Next Development Version 2017-01-26 14:20:39 +00:00