Spring (3) 是否有内置的分页支持?
I have a model I need to paginate (Book listings - as explained in a previous question.).
This seems like a common enough feature that I would expect some pre-built solutions for it without having to build a custom solution.
Does Spring (3) have support for pagination?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
其中包括一些辅助类。例如,有一个名为 org.springframework.beans.support.PagedListHolder 的类。分页的解决方案有很多种,具体取决于您愿意做出的权衡,因此没有一种单一的公认方法可以实现这一点。 本文有一个很好的概述。
There are some helper classes included. For instance there's a class called org.springframework.beans.support.PagedListHolder. There are a number of solutions to pagination depending on what trade-offs you're willing to make, so there is no one single accepted way to do it. This article has a good overview.
Spring Data 支持 Web 分页,如下所述:
Spring Data has support for web pagination, as described here:
http://static.springsource.org/spring-data/data-jpa/docs/current/reference/html/repositories.html#web-pagination