How to do a paged QueryDSL query with Spring JPA?
问题 QueryDSL defines an OrderSpecifier interface and an instance for that can be easily obtained for any field by calling asc() or desc() . The QueryDslPredicateExecutor interface of Spring Data JPA even has a findAll() method which takes OrderSpecifier s as parameters. org.springframework.data.domain.PageRequest however doesn't know anything about QueryDSL and it has its own way for defining query sort order, namely org.springframework.data.domain.Sort . It can contain a number of org