自定义分页性能显著太过繁琐了
—》咱们应用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数据操作的架构的。办法不止这一种