mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-23 06:29:10 +00:00
Spring Boot has honored @Primary for selecting which candidate bean @MockBean and @SpyBean should mock or spy since Spring Boot 1.4.3; however, the support for @Primary was not ported from Spring Boot to Spring Framework's new Bean Overrides feature in the TestContext framework. To address that, this commit introduces support for @Primary for selecting bean overrides -- for example, for annotations such as @TestBean, @MockitoBean, and @MockitoSpyBean. See https://github.com/spring-projects/spring-boot/issues/7621 Closes gh-33819