Mybatis分页的实现
mysql的分页语句
elect * from user limit #{startIndex},#{pageSize};
# startIndex : 起始位置 ,默认是0开始
# pageSize :页面大小
# 如何计算出当前页面
currentPage = (currentPage-1)* pageSize
使用limit实现分页
1.编写dao接口
List<User> selectUserByLimit(Map<String,Integer> map);
2.编写对应mapper映射文件的方法