Closed tobias-lippert closed 19 hours ago
This is the intended behavior. If you'd like to see Spring Framework behave differently, you'll need to open a Spring Framework issue.
Thanks @wilkinsona . Gonna raise an issue there, to see what they think.
Version: Spring Boot 3.4.0-RC1 Hi Spring team,
I'm not sure if this belongs to Spring Boot or Spring framework since the new annotation is part of the Spring framework but the old annotation is part of Spring Boot. Previously, when using @SpyBean I did not have to create a bean instance in my test context to spy on it. This is now different as stated in the docs and the blog post (https://docs.spring.io/spring-framework/reference/testing/annotations/integration-spring/annotation-mockitobean.html). If this is intended behavior, feel free to close this issue since it is clearly documented.
Otherwise, I can create a reproducer, I think.