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

briantaurostack7 picture briantaurostack7 · May 10, 2016 · Viewed 60.9k times · Source

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

Answer

user180100 picture user180100 · May 10, 2016

There is a Page implementation for that:

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