Skip to content

@MockitoSpyBean behavior different from @SpyBean #43245

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tobias-lippert opened this issue Nov 21, 2024 · 2 comments
Closed

@MockitoSpyBean behavior different from @SpyBean #43245

tobias-lippert opened this issue Nov 21, 2024 · 2 comments
Labels
for: external-project For an external project and not something we can fix status: invalid An issue that we don't feel is valid

Comments

@tobias-lippert
Copy link
Contributor

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.

@wilkinsona
Copy link
Member

This is the intended behavior. If you'd like to see Spring Framework behave differently, you'll need to open a Spring Framework issue.

@wilkinsona wilkinsona closed this as not planned Won't fix, can't repro, duplicate, stale Nov 21, 2024
@wilkinsona wilkinsona added status: invalid An issue that we don't feel is valid for: external-project For an external project and not something we can fix labels Nov 21, 2024
@tobias-lippert
Copy link
Contributor Author

Thanks @wilkinsona .
Gonna raise an issue there, to see what they think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: external-project For an external project and not something we can fix status: invalid An issue that we don't feel is valid
Projects
None yet
Development

No branches or pull requests

2 participants