• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

SpringBoot test: NoSuchBeanDefinitionException for ReactiveMongoRepository

 
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to test service-class of reactive mongoDB application, created on SpringBoot.

I don't use embedded mongodb! I'm only trying to mock repository

This is reactive mongo repository:


Repository, which should use it:


And test class:


Main configuration:



May be It doesn't matter is that case, but test-configurations is:


And, after running test, I receive the following exception:


caused by:


What am I doing wrong?
 
Bartender
Posts: 2061
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I guess you may not need to define the EntryRepositoryImpl class at all. In Spring Data JPA, the EntryRepositoryImpl is automatically generated.
Here is an example:
https://spring.io/guides/gs/accessing-data-mongodb/
You can see, the developer does not develop any implementation for the repository interface.
 
This is my favorite show. And this is my favorite tiny ad:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic