欢迎您关注微|信|公|众|号:学习微站
自定义分页功能明显太过繁琐了
—》我们使用pageHelper插件来快速实现分页功能 1、在pom.xml文件中引入依赖库
`com.github.pagehelper`
`pagehelper`
`5.1.10`
2、在spring-mybatis添加分页配置
3、Controller添加
欢迎您关注微|信|公|众|号:学习微站
`@RequestMapping(value = "/getUserPage")`
`public String getUserPage(Page page, Model model){`
`PageInfouserPageInfo = userService.selectPage(page);`
`model.addAttribute("pageInfo",userPageInfo);`
`model.addAttribute("url","user/getUserPage");`
`return "user/userList";`
`}`
`
欢迎您关注微|信|公|众|号:学习微站

上面是针对SSM场景来做的,pagehelper插件本身就是基于Mybatis这种框架进行开发的插件。所以,主要都是针对Mybatis数据操作的架构的。方法不止这一种
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。