spring-data – 在Spring Data Cassandra中分页和排序查询

根据
Spring-data-cassandra文档,

http://docs.spring.io/spring-data/cassandra/docs/1.1.1.RELEASE/reference/html/#requirements

支持分页和排序查询,但是,当我使用Interface PagingAndSortingRepository时,分页查询会抛出以下异常:

以下是我的界面定义:

@EnableCassandraRepositories
public interface PersonRepository extends PagingAndSortingRepository<User, String>

.
.
.

下面是堆栈跟踪:

Caused by: org.springframework.dao.InvalidDataAccessApiUsageException: neither slice nor page queries are supported yet
 at org.springframework.data.cassandra.repository.query.CassandraQueryMethod.verify(CassandraQueryMethod.java:80)
 at org.springframework.data.cassandra.repository.query.CassandraQueryMethod.<init>(CassandraQueryMethod.java:68)
 at org.springframework.data.cassandra.repository.support.CassandraRepositoryFactory$CassandraQueryLookupStrategy.resolveQuery(CassandraRepositoryFactory.java:106)
 at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.<init>(RepositoryFactorySupport.java:357)
 at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:192)
 at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.initAndReturn(RepositoryFactoryBeanSupport.java:239)
 at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.afterPropertiesSet(RepositoryFactoryBeanSupport.java:225)
 at org.springframework.data.cassandra.repository.support.CassandraRepositoryFactoryBean.afterPropertiesSet(CassandraRepositoryFactoryBean.java:62)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1613)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1550)
 ... 11 more

请帮忙 !!!

最佳答案 这是文档复制/粘贴错误.请输入错误文档的JIRA问题.跟踪是否有分页和问题已经存在问题.可以在
https://jira.spring.io/browse/DATACASS-56支持排序

点赞