https://github.com/egzosn/mybatis-page-plug
超级精简,超级简单,超级优雅实现mybatis分页功能
https://github.com/egzosn/mybatis-page-plug
Last synced: over 1 year ago
JSON representation
超级精简,超级简单,超级优雅实现mybatis分页功能
- Host: GitHub
- URL: https://github.com/egzosn/mybatis-page-plug
- Owner: egzosn
- License: apache-2.0
- Created: 2018-05-31T08:20:36.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-07-16T13:28:52.000Z (about 3 years ago)
- Last Synced: 2025-03-24T13:44:20.828Z (over 1 year ago)
- Language: Java
- Size: 28.3 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mybatis-page-plug
超级精简,超级简单,超级优雅实现mybatis分页功能
#### 本项目在以下代码托管网站
* 码云:https://gitee.com/egzosn/mybatis-page-plug
* GitHub:https://github.com/egzosn/mybatis-page-plug
# 简单使用
### 将 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