How to use projection interfaces with pagination in Spring Data JPA?

后端 未结 6 2113
-上瘾入骨i
-上瘾入骨i 2021-02-19 10:50

I\'m trying to get a page of a partial entity (NetworkSimple) using the new feature of spring data, projections

I\'ve checked the documentation and if I request only:

6条回答
  •  说谎
    说谎 (楼主)
    2021-02-19 11:32

    You can use interface projection with Pageable like this :

    Page findPagedProjectedBy(Pageable pageable);
    

    with some parameter :

    Page findPagedProjectedByName(String name, Pageable pageable);
    

提交回复
热议问题