使用步骤: 通过maven,下载相应的jar包。(https://mvnrepository.com)在mybatis的配置文件中注册pageHelper在查询前调用PageHelper.startPage()方法,传入你想要传的参数,之后紧跟的 查询就是一个分页查询查询完成后,可以把结果交给PageInfo,然后把PageInfo传给页面就可以了。。 PageHelper技术文档(https://github.com/pagehelper/Mybatis-PageHelper)