Spring Data - MongoDB - JUnit test
问题 I would have a question concerning Spring Data - MongoDB and JUnit test. @RunWith(SpringJUnit4ClassRunner.class) @SpringApplicationConfiguration(classes = { UserRepository.class, User.class }) public class MyJUnitTest { The UserRepository looks like this: @Repository public interface UserRepository extends MongoRepository<User, String> { User findByUsername(final String username); } I get the following Exception: Failed to instantiate [... .repository.UserRepository]: Specified class is an