mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Previously, when spying on a scoped bean the creation of the spy would be performed using the scoped proxy. This would result in the spy being unable to spy on any of the target bean's methods as the scoped proxy's implementations of those methods would be final. This commit updates MockitoPostProcessor so that the creation of the spy and injection of the @SpyBean-annotated field is performed using the scoped target. The scoped target has not be proxied so this allows Mockito to spy on all of its methods. Closes gh-17817 |
||
---|---|---|
.. | ||
src | ||
pom.xml |