Skip to content

Commit ae14b36

Browse files
committed
support Pageable.unpaged(sort)
1 parent 3351350 commit ae14b36

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java

+3
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,9 @@ public List<T> findAll(Sort sort) {
428428
public Page<T> findAll(Pageable pageable) {
429429

430430
if (pageable.isUnpaged()) {
431+
if(pageable.getSort().isSorted()) {
432+
return new PageImpl<>(findAll(pageable.getSort()));
433+
}
431434
return new PageImpl<>(findAll());
432435
}
433436

0 commit comments

Comments
 (0)