PagingAndSortingRepository 无法解析 [英] PagingAndSortingRepository cannot be resolved

查看:97
本文介绍了PagingAndSortingRepository 无法解析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 Spring Data 中的 PagingAndSortingRepository:

I'm try to use PagingAndSortingRepository from Spring Data:

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

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

但我收到此错误:

org.springframework.data.repository.PagingAndSortingRepository无法解决

我的代码有什么问题,我该如何解决?

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

推荐答案

这个为我解决了问题

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>

这篇关于PagingAndSortingRepository 无法解析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆