我可以使用 spring-data-jdbc 进行分页吗?
Can I do pagination with spring-data-jdbc?
我想将 PagingAndSortingRepository 与 spring-data-jdbc 一起使用,但它似乎不起作用。它仅适用于 JPA ?
我尝试使用 PagingAndSortingRepository 并使用 findAll(Pageable pageable)。
但我实际上得到了 "No query specified on findAll"
PagingAndSortingRepository
自版本 2.0 M3
起受支持
提出此问题时该版本不可用。
原回答
是的,你是对的,分页还没有准备好。
居然有一个PR that will create infrastructure for that but it won't enable the feature yet. For that you should watch https://jira.spring.io/browse/DATAJDBC-101.
2020年更新
在版本 2.0.0.M3 (2020-02-12) 中引入了对 PagingRepositories 的支持。
我想将 PagingAndSortingRepository 与 spring-data-jdbc 一起使用,但它似乎不起作用。它仅适用于 JPA ?
我尝试使用 PagingAndSortingRepository 并使用 findAll(Pageable pageable)。
但我实际上得到了 "No query specified on findAll"
PagingAndSortingRepository
自版本 2.0 M3
提出此问题时该版本不可用。
原回答
是的,你是对的,分页还没有准备好。
居然有一个PR that will create infrastructure for that but it won't enable the feature yet. For that you should watch https://jira.spring.io/browse/DATAJDBC-101.
2020年更新
在版本 2.0.0.M3 (2020-02-12) 中引入了对 PagingRepositories 的支持。