1、定义分页pojo类
public class Page{
private int start;
private int limit
//setter and getter
}
2、接口设计时需要传入Page 类型的对象page(@Param("page"))
3、映射文件中sql语句尾部添加limit #{page.start},#{page.limit}
1、定义分页pojo类
public class Page{
private int start;
private int limit
//setter and getter
}
2、接口设计时需要传入Page 类型的对象page(@Param("page"))
3、映射文件中sql语句尾部添加limit #{page.start},#{page.limit}