In my case, I had the wrong dependency: spring-data-jpa
.
when I changed to spring-boot-starter-data-jpa, it solved the problem.
I didn’t have to add any annotation @Repository
nor @EnableJpa
etc.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>