Skip to content
New issue

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

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

Already on GitHub? # to your account

Spring Data Repository cannot be spied on using @SpyBean #6797

Closed
maverick1601 opened this issue Aug 31, 2016 · 1 comment
Closed

Spring Data Repository cannot be spied on using @SpyBean #6797

maverick1601 opened this issue Aug 31, 2016 · 1 comment
Labels
status: duplicate A duplicate of another issue

Comments

@maverick1601
Copy link

Bug Report/Enhancement

Since Spring Boot 1.4.0 @SpyBean can be used to spy on beans within the ApplicationContext. Unfortunately, Spring Data Reposity Beans seem to be added to the BeanFactory too late, for the MockitoPostProcessor to find the bean reference. Thus, it tries to add a new RootBeanDefinition for the spied Repository interface, which results in an instantiation error.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 31, 2016
@wilkinsona
Copy link
Member

Duplicates #6541

@wilkinsona wilkinsona added status: duplicate A duplicate of another issue and removed status: waiting-for-triage An issue we've not yet triaged labels Aug 31, 2016
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

3 participants