title: Spring MVC and Hibernate - How to implement pagination?
body: <p>I have seen some related questions on the subject, such as:
  <a href="https://stackoverflow.com/questions/2245035/how-to-implement-pagination-in-spring-mvc-3">How to implement pagination in Spring MVC 3</a></p>
  
  <p>But it looks to me that all the data are loaded first and that the page size is set afterwards... what happens if there are thousands of records in the DB?</p>
  
  <p>I have been looking for a clear example but I haven't been successful. Moreover, is there different way to implement pagination, with either Spring or Hibernate?</p>