springboot简单Mybatis分页插件使用Pagehelper
时间:2021-11-10 作者:匿名
这个应该有很多人用过了
今天集成到项目了
本来用的是Mybatis plus 的分页插件
感觉还是github的pagehelper 这个好用
因为是springboot项目
导入pom文件
域名erties配置
页面实体
简单使用方法
public R list(@RequestParam Map<String, Object> params,@RequestParam(required = false,defaultValue = “1”,value = “pn”)Integer pn){
域名tPage(pn, 2);
List<ArticleInfoEntity> list = 域名ctList(null);
NewPageUtils page= new NewPageUtils(list);
return 域名().put(“page”, page);
}
实例