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

后端 未结 3 940
傲寒
傲寒 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:00

    There is a Page implementation for that:

    final Page page = new PageImpl<>(theListOfSomething);
    

提交回复
热议问题