xml配置PageHepler
添加maven依赖
com.github.pagehelper pagehelper 3.4.2-fix
mybatisConfig.xml添加配置
使用
public Listlist(Integer num){ PageHelper.startPage(1,num);//开启分页功能,会在拦截器链中添加分页功能的拦截器 return this.userMapper.selectAll(); }
添加maven依赖
com.github.pagehelper pagehelper 3.4.2-fix
mybatisConfig.xml添加配置
使用
public Listlist(Integer num){ PageHelper.startPage(1,num);//开启分页功能,会在拦截器链中添加分页功能的拦截器 return this.userMapper.selectAll(); }