maven-mybatis分页插件配置

1.pom.xml

1.Spring配置文件中

maven-mybatis分页插件配置_第1张图片

3.代码

PageBounds pageBounds = new PageBounds(page, pageSize);

Map map=new HashMap();

map.put("username", "%");

List list=session.selectList("com.zap.demo2.mapper.UserMapper.selectUsers", map, pageBounds);

System.out.println(list.size());

PageList pageList = (PageList)list;

System.out.println("totalCount: " + pageList.getPaginator().getTotalCount());

System.out.println("totalPages: " + pageList.getPaginator().getTotalPages());

System.out.println("page: " + pageList.getPaginator().getPage());

System.out.println("StartRow: " + pageList.getPaginator().getStartRow());

System.out.println("EndRow: " + pageList.getPaginator().getEndRow());

 



你可能感兴趣的:(IT)