Need help with Mybatis-PageHelper?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

10.7K Stars 3.0K Forks MIT License 579 Commits 32 Opened issues



Services available


Need anything else?

Contributors list

MyBatis Pagination - PageHelper

MyBatis Pagination - PageHelper

Build Status Maven central


If you are using MyBatis, it is recommended to try this pagination plugin. This must be the MOST CONVENIENT pagination plugin.

PageHelper supports any complex single-table, multi-table queries. As to some special cases, please refer to the Important note.

Want to use PageHelper? Please check out How to use PageHelper.

New JavaDoc


《MyBatis 从入门到精通》

MyBatis 从入门到精通


CSDN Blog:


Support MyBatis 3.1.0+

Physical Paging

PageHelper supports the following databases PageAutoDialect:

static {
    //register aliass
    registerDialectAlias("hsqldb", HsqldbDialect.class);
    registerDialectAlias("h2", HsqldbDialect.class);
    registerDialectAlias("phoenix", HsqldbDialect.class);
    registerDialectAlias("postgresql", PostgreSqlDialect.class);
    registerDialectAlias("mysql", MySqlDialect.class); 
    registerDialectAlias("mariadb", MySqlDialect.class); 
    registerDialectAlias("sqlite", MySqlDialect.class);
    registerDialectAlias("herddb", HerdDBDialect.class);
    registerDialectAlias("oracle", OracleDialect.class); 
    registerDialectAlias("oracle9i", Oracle9iDialect.class); 
    registerDialectAlias("db2", Db2Dialect.class); 
    registerDialectAlias("informix", InformixDialect.class); 
    //解决 informix-sqli #129,仍然保留上面的 
    registerDialectAlias("informix-sqli", InformixDialect.class);
    registerDialectAlias("sqlserver", SqlServerDialect.class); 
    registerDialectAlias("sqlserver2012", SqlServer2012Dialect.class);
    registerDialectAlias("derby", SqlServer2012Dialect.class); 
    registerDialectAlias("dm", OracleDialect.class); 
    registerDialectAlias("edb", OracleDialect.class); 
    registerDialectAlias("oscar", OscarDialect.class); 
    registerDialectAlias("clickhouse", MySqlDialect.class); 
    registerDialectAlias("highgo", HsqldbDialect.class); 
    registerDialectAlias("xugu", HsqldbDialect.class); 

If the database you are using is not in this list, you can configure the


This parameter allows to configure the alias of a custom implementation, which can be used to automatically obtain the corresponding implementation according to the JDBCURL, and allows to overwrite the existing implementation in this way. The configuration example is as follows (use semicolons to separate multiple alias):

Use QueryInterceptor spec


To use PageHelper, you just need to include the pagehelper-x.y.z.jar and jsqlparser-x.y.z.jar file in the classpath.

For version matching relation, please refer to the dependent version in pom.

If you are using Maven, you could just add the following dependency to your

    latest version

If you are using Spring Boot, You can refer to the pagehelper-spring-boot-starter



Spring integration sample

Submit BUG

Thanks for free JetBrains Open Source license

Author Info



Email: [email protected]

PageHelper on github:

PageHelper on gitosc:

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.