Leave a Reply

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

Notify of
avatar

Saurav Raj
Guest
Saurav Raj
4 days 22 hours ago

very well explained. Good effort.Appreciated.Thanks !!

G. VAIBHAV REDDY
Guest
G. VAIBHAV REDDY
20 days 15 hours ago

Here's the dependency we need to add to pom.xml if you are not seeing this import "javax.persistence.Entity"<!– mvnrepository.com/artifact/org.springframework.data/spring-data-jpa –> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> </dependency>

Skullid13
Guest
Skullid13
1 month 19 days ago

Thank you Rajesh, great video

venu chary
Guest
venu chary
3 months 27 days 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
29 days 7 hours ago

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

luv2bwith
Guest
luv2bwith
3 months 27 days 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