Watch 1 Star 0 Fork 2

MyBatis项目 / mybatis-page-plugJavaApache-2.0

forked from egan / mybatis-page-plug 
Sign up for free
Explore and code with more than 2 million developers,Free private repositories !:)
Sign up
超级精简,超级简单,超级优雅实现mybatis分页功能 spread retract

Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

mybatis-page-plug

超级精简,超级简单,超级优雅实现mybatis分页功能

简单使用

将 com.egzosn.mybatis.page.plug.PagingInterceptor 拦截器加入至spring 容器即可

本项目简单例子是spring boot 项目,

  1. 修改application.yml 对应的数据源,
  2. 导入db.sql的数据库脚本
  3. 然后直接运行 com.egzosn.demo.DemoApplication 即可

这里对 com.egzosn.demo.dao.UsersMapper 三种运用场景

入参 com.egzosn.demo.controller.UsersController.pages1

http://127.0.0.1:8080/pages1?cname=egan&page=1&rows=5

对象继承 com.egzosn.demo.service.UsersService.pages2

http://127.0.0.1:8080/pages2?cname=egan&page=1&rows=5

这里以分页入参方式进行查询所有,包装成分页对象返回所有 com.egzosn.demo.controller.UsersController.find

http://127.0.0.1:8080/find

Comments ( 1 )

You need to Sign in for post a comment

Help Search