[SpringBoot] QueryDsl의 Pagenation + PageableExecutionUtils을 이용해 count 쿼리 최적화
·
Backend/Spring Boot
JPA Repository를 사용할 때 public interface PostRepository extends JpaRepository { Page findByTitle(String title, Pageable p); } JPA repository는 Pageable을 매개변수로 받을 시 , 반환형을 Page로 추상화 해준다.    QueryDsl을 사용할 때@Repository@RequiredArgsConstructorpublic class PostRepositoryImpl implements PostRepositoryCustom { private final JPAQueryFactory queryFactory; @Override public Page findByTitleCustom(Str..