This commit documents how the Bean Override support in the TestContext framework interacts with Spring AOP proxies created for annotations such as @Transactional, @Cacheable, and @Retryable. The new "Bean Overrides and Spring AOP Proxies" section in the general Bean Overriding documentation explains that overrides using the WRAP strategy (such as @MockitoSpyBean) end up as the target of any AOP proxy subsequently created for the original bean; whereas, overrides using the REPLACE or REPLACE_OR_CREATE strategy (such as @TestBean, @MockitoBean) bypass the container's bean post-processing entirely and therefore carry no AOP advice at all. The new "@MockitoSpyBean and Spring AOP Proxies" section documents the resulting stubbing and verification semantics. Verification via Mockito's verify() API works transparently regardless of whether it is invoked on the proxy or on the spy. Stubbing via doReturn(...)/doThrow(...) is safe for stateless advice such as @Retryable, but can silently corrupt the spy's configured answers for stateful or memoizing advice such as @Cacheable, since the invocation used to declare a stub is intercepted by Mockito before it reaches the spy and returns an empty value that such advice may then cache. AopTestUtils.getUltimateTargetObject(...) is documented as the way to stub directly against the spy in that case. The same section also documents how to disable the AOP advice for a test altogether while leaving it in place in production code – for example, binding a @Retryable attribute to a property placeholder overridden via @TestPropertySource, or replacing the CacheManager with a NoOpCacheManager via @TestBean. Brief cross-referencing notes have also been added to the @TestBean documentation and to the existing AopTestUtils description in the "General Testing Utilities" section, to avoid duplicating the explanation across pages. In addition, the Javadoc for @MockitoSpyBean now contains a concise WARNING summarizing these AOP proxy implications and linking to the new reference documentation section for details. Closes gh-37121
Spring Framework

This is the home of the Spring Framework: the foundation for all Spring projects. Collectively the Spring Framework and the family of Spring projects are often referred to simply as "Spring".
Spring provides everything required beyond the Java programming language for creating enterprise applications for a wide range of scenarios and architectures. Please read the Overview section of the reference documentation for a more complete introduction.
Code of Conduct
This project is governed by the Spring Code of Conduct. By participating, you are expected to uphold this code of conduct. Please report unacceptable behavior to spring-code-of-conduct@spring.io.
Access to Binaries
For access to artifacts or a distribution zip, see the Spring Framework Artifacts wiki page.
Documentation
The Spring Framework maintains reference documentation (published and source), GitHub wiki pages, and an API reference. There are also guides and tutorials across Spring projects.
Micro-Benchmarks
See the Micro-Benchmarks wiki page.
Build from Source
See the Build from Source wiki page and the CONTRIBUTING.md file.
Continuous Integration Builds
CI builds are defined with GitHub Actions workflows.
Stay in Touch
Follow @SpringCentral, @SpringFramework, and its team members on 𝕏. In-depth articles can be found at The Spring Blog, and releases are announced via our releases feed.
License
The Spring Framework is released under version 2.0 of the Apache License.