-
Notifications
You must be signed in to change notification settings - Fork 18
User Guide
loafer edited this page Feb 27, 2014
·
2 revisions
include the following in mybatis-config.xml.
<plugins>
<plugin interceptor="com.github.loafer.mybatis.pagination.PaginationInterceptor">
<property name="dialect" value="oracle"/>
<property name="stmtIdRegex" value="*.selectPaging"/>
</plugin>
</plugins>
or
<plugins>
<plugin interceptor="com.github.loafer.mybatis.pagination.PaginationInterceptor">
<property name="dialectClass" value="com.github.loafer.mybatis.pagination.dialect.OracleDialect"/>
<property name="stmtIdRegex" value="*.selectPaging"/>
</plugin>
</plugins>
-
dialect, database type. oracle\mysql -
dialectClass, a subclass ofcom.github.loafer.mybatis.pagination.dialect.Dialect. -
stmtIdRegex, statement id regex string. example:*.selectPagingor*.selectPaging*.
<select id="selectPaging" resultType="hashmap">
select * from ent_user
</select>
@See config and Basic Usage
In addition, sogyf/mybatis-pagination maybe help you.