-
Notifications
You must be signed in to change notification settings - Fork 41.2k
@MockBean SpringDataRepository fails with NoUniqueBeanDefinitionException #6640
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
Comments
That's most probably related to #6602 yes. |
Duplicates #6541 |
I'm curious why this is a duplicate. The other issue has trouble On Aug 13, 2016 1:54 AM, "Andy Wilkinson" notifications@github.com wrote:
|
@rwinch Have you read the duplicate issue and this comment in particular? Hopefully it explains my reasoning. |
@wilkinsona Thanks for the response. I didn't notice that you had pointed at a separate issue than @snicoll and I were referencing. You are correct. This is a duplicate and is fixed in the latest SNAPSHOT (as mentioned in the issue, #6541, you linked to) |
Description
If
@MockBean
is used on a Spring Data repository that is also@Autowired
into another component in Spring Boot 1.4.0.RELEASE, aNoUniqueBeanDefinitionException
is thrown. For example (link to GitHub repository with complete sample further down):Produces:
Complete Sample
You can find a sample of the project at https://github.com/rwinch/spring-boot-gh-6640
@Autowired
into another component (only into the test)Related to?
Possibly related to #6602
The text was updated successfully, but these errors were encountered: