【发布时间】:2012-07-15 07:08:18
【问题描述】:
我有一个很奇怪的问题。在我的存储库中,我需要扩展JpaSpecificationExecutor<T> 接口以便能够使用findAll(Specification<T>, Pageable) 进行自定义查询分页。
但是,当我使用 JpaSpecificationExecutor 时,
public interface DescriptionRepository extends ParentRepositoryCustom<Description, Long>,
JpaSpecificationExecutor<Description> {
}
应用程序无法构建,抛出 No property count found for type class Description 异常。
我的Description 类没有计数属性。当我从存储库中删除 JpaSpecificationExecutor 时,一切都恢复正常了。
【问题讨论】:
标签: java spring-data spring-data-jpa