Leave a Reply

4 Comments on "Spring Boot Quick Start 28 – Creating a Spring Data JPA Repository"

Notify of
avatar

Skullid13
Guest
Skullid13
24 days 5 hours ago

Thank you Rajesh, great video

venu chary
Guest
venu chary
3 months 1 day ago

Hey KoushikYour tutorials are awesome. I have this one doubt. You said CrudRepository is a class and declared TopicRepository as an interface. In Java an interface cann't extend a class right?

h s
Guest
h s
3 days 9 hours ago

crudRepository is an Interface, and in Java an Interface can extend another Interface, not "implements"

luv2bwith
Guest
luv2bwith
3 months 1 day ago
CrudRepository is not a class,its an interface. There are a number of such interfaces provided by Spring Data JPA module viz. JPARepository, PagingAndSortingRepository, CrudRepository. The choice of repository depends upon the type of database you need to connect to.As for example,if you are connecting to MongoDB, you would use CrudRepository since PagingAndSortingRepository is difficult to implement in a MongoDB.The actual implementation for these repositories is abstracted by Spring Data JPA. You can create your own interface that extends any of these above Repository Interfaces and then implement that interface in any class of your own to provide additional or custom… Read more »
wpDiscuz