Skip to content

loafer/mybatis-paging

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mybatis-paging

Based on the database dialect Mybatis3 paging plug-in.
The current support for Oracle、 MySQL .

Basic Usage

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 of com.github.loafer.mybatis.pagination.dialect.Dialect.
  • stmtIdRegex, statement id regex string. example: *.selectPaging or *.selectPaging*.

SQL Mapper config

<select id="selectPaging" resultType="hashmap">
    select * from ent_user
</select>

@See config and Basic Usage

Others

In addition, sogyf/mybatis-pagination maybe help you.

About

Based on the database dialect Mybatis3 paging plug-in

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages