How to convert a List of enity Object to Page Object in Spring Mvc Jpa?

后端 未结 3 932
傲寒
傲寒 2021-02-01 01:31

I have a List of entities. How do I convert it to Page Object using Spring MVC 4 and Spring Data JPA?

3条回答
  •  温柔的废话
    2021-02-01 02:14

    There is one more Constructor :

    Page page = new PageImpl<>(listOfsomething, pageable, listOfsomething.size());
    

提交回复
热议问题