Skip to content

Commit 12c3bf0

Browse files
author
Stephen.lin
authored
Update README.md
晚上 使用说明
1 parent d65269e commit 12c3bf0

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,20 @@
33
基于 exectur 拦截 查询请求
44
#### For Example
55

6+
* 1.java 代码示例:
67
```java
78
PageHelper.pageStart(pager);
9+
//mapper方法 以 ByPager 结尾,这是可配置的
810
List<Object> list = testerMapper.selectListByPager(post);
9-
pager = PageHelper.pageEnd();
11+
PageHelper.pageEnd();
1012
```
13+
* 2.在mybatis -config.xml 中的配置
14+
```xml
15+
<plugins>
16+
<plugin interceptor="com.zuicoding.platform.mybatis.pagination.PaginationHandler">
17+
<property name="dialect" value="xxx.xxx.xxx"/>`
18+
</plugin>
19+
</plugins>
20+
```
21+
* 3.sql 方言 dialect 是可配置的,目前提供的有mysql的方言。
22+
当然如果 你可以自定义 sql dialect ,只需要实现 IDialect 接口就可以了,然后在 `<property name="dialect" value="xxx.xxx.xxx"/>`配置你的实现类引用就可以了。

0 commit comments

Comments
 (0)