Leave a Reply

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

Notify of
avatar

Hugh O'Brien
Guest
Hugh O'Brien
3 days 22 hours ago

You can not import the necessary libraries for CrudRepository after Spring Boot version 1.5.4.

Hugh O'Brien
Guest
Hugh O'Brien
3 days 22 hours ago

revert to version 1.4.7 and it will work.

priyam gupta
Guest
priyam gupta
10 days 15 hours ago

You did not make any video on connection of actual database with Spring Boot

Omkar Kulkarni
Guest
Omkar Kulkarni
22 days 12 hours ago

did you forget to add @Repository annotation to the repository? If its not there, the repository wont be picked up by the compiler at runtime.

Vijay Anand Mehta
Guest
Vijay Anand Mehta
2 months 2 days ago

may be a silly question but….the annotation you are using are provide by whom…Spring MVC?Please do replythank you

Neeraj Kashyap
Guest
Neeraj Kashyap
2 months 11 days ago

What if I am having composite ID in an Entity, and also many different type of entities to be persisted. Do I need to create that many number of interfaces ?

Mac New
Guest
Mac New
2 months 12 days ago

Field topicRepository in io.javabrains.springbootquickstart.topic.TopicService required a bean of type 'io.javabrains.springbootquickstart.topic.TopicRepository' that could not be found. problem

Saurav Raj
Guest
Saurav Raj
3 months 13 hours ago

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

G. VAIBHAV REDDY
Guest
G. VAIBHAV REDDY
3 months 16 days 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
4 months 14 days ago

Thank you Rajesh, great video

venu chary
Guest
venu chary
6 months 22 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
3 months 23 days ago

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

luv2bwith
Guest
luv2bwith
6 months 21 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