mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
08e0baac94
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