Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PagingAndSortingRepository cannot be resolved

I'm try to use PagingAndSortingRepository from Spring Data:

import org.springframework.data.jpa.repository.JpaRepository;

public interface StudentRepository extends JpaRepository<Student, Integer> {}

But I receive this error:

org.springframework.data.repository.PagingAndSortingRepository can't be resolved

What wrong with my code and how can I fix it?

like image 959
Chan Avatar asked Aug 09 '17 03:08

Chan


1 Answers

This one solved issue for me

Gradle

// https://mvnrepository.com/artifact/org.springframework.data/spring-data-jpa
compile group: 'org.springframework.data', name: 'spring-data-jpa', version: '2.0.1.RELEASE'

Maven

<!-- https://mvnrepository.com/artifact/org.springframework.data/spring-data-jpa -->
<dependency>
    <groupId>org.springframework.data</groupId>
    <artifactId>spring-data-jpa</artifactId>
    <version>2.0.1.RELEASE</version>
</dependency>
like image 54
HaroonIsmailbasha Avatar answered Oct 03 '22 00:10

HaroonIsmailbasha