PagingAndSortingRepository 无法解析

2024-01-11

我尝试使用PagingAndSortingRepository from 春季数据:

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

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

但我收到此错误:

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

我的代码有什么问题以及如何修复它?


这为我解决了问题

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>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

PagingAndSortingRepository 无法解析 的相关文章

随机推荐