I\'ve started to use Spring Data JPA. Unfortunately I can\'t configure it. I have Entity
class, Repository
interface, but when I try to test it, so
Your test is annotated with @ContextConfiguration(classes = EmployeeRepository.class)
However, the classes
property of this annotation should reference configurations (class annotated with @Configuration
like your AppConfig
). So you are launching your test without a configuration for spring-data and your repository.
If you want to test your repository, you should create a @Configuration with the @EnableJpaRepositories
and an in-memory database.