PageHelper integration with Spring Boot PageHelper-Spring-Boot-Starter ?助?集成分??件到 Spring Boot。 PageHelper-Spring-Boot-Starter will help you use PageHelper with Spring Boot. Support PageHelper 6.x How to use 在 pom.xml 中添加如下依?: Add the following dependency to your pom.xml: < dependency > < groupId >com.github.pagehelper</ groupId > < artifactId >pagehelper-spring-boot-starter</ artifactId > < version >2.1.0</ version > </ dependency > 微信公?? v2.1.0 - 2023-12-17 升? PageHelper 到 6.1.0,支持?步 count 等功能,???看 6.1.0 升? MyBatis 到 3.5.15 升? springboot 到 2.7.18 新增?? orderBySqlParser , OrderBySqlParser 改?接口,允?通? orderBySqlParser ??替??自己的?? 新增?? sqlServerSqlParser , SqlServerSqlParser 改?接口,允?通? sqlServerSqlParser ??替??自己的?? 接口 CountSqlParser , OrderBySqlParser , SqlServerSqlParser ?支持SPI方式覆盖默???,?先?低于??指定 v2.0.0 - 2023-11-05 升? PageHelper 到 6.0.0,支持?步 count 等功能,???看 6.0 升? MyBatis 到 3.5.15 升? springboot 到 2.7.17 新增?? asyncCount ,增加?步count支持,默? false ,?次?置: PageHelper.startPage(1, 10).enableAsyncCount() ; 新增?? countSqlParser , CountSqlParser 改?接口,允?通? countSqlParser ??替??自己的?? ??示例: pagehelper.async-count =true v1.4.7 - 2023-06-03 升? PageHelper 到 5.3.3 升? MyBatis 到 3.5.13 升? MyBatis Starter 到 2.3.1 升? springboot 到 2.7.12 v1.4.6 - 2022-11-28 兼容 Spring Boot 3.0 by pky920216344 功能完善:存在PageInterceptor及其子?就不再添加??器 by jingheee v1.4.5 - 2022-09-18 升? PageHelper 到 5.3.2 v1.4.4 - 2022-09-16 修?配置文件中kebab-case?格的配置?失效的?? pr#138, by ShoWen 兼容性支持,demo配置修改 升? springboot 到 2.7.3 v1.4.3 - 2022-06-18 升? PageHelper 到 5.3.1 升? MyBatis 到 3.5.10 升? springboot 到 2.7.0 v1.4.2 - 2022-04-06 升? MyBatis 到 3.5.9 升? MyBatis Starter 到 2.2.2 升? springboot 到 2.6.6 v1.4.1 - 2021-11-24 升? springboot 到 2.6.0,兼容性修?,解?循?依? v1.4.0 - 2021-10-07 升? PageHelper 到 5.3.0 升? springboot 到 2.5.5 增加 autoDialectClass ??,?情看 PageHelper 更新日志 v1.3.1 - 2021-06-20 升? PageHelper 到 5.2.1 升? MyBatis 到 3.5.7 升? MyBatis Starter 到 2.2.0 升? springboot 到 2.5.1 PageHelperAutoConfiguration 使用 InitializingBean 接口代替 @PostConstruct 注解 v1.3.0 - 2020-07-26 升? PageHelper 到 5.2.0,包含大量改?,???容?考: PageHelper 更新日志 升? MyBatis 到 3.5.5 升? MyBatis Starter 到 2.1.3 升? springboot 到 2.3.1.RELEASE PageHelperAutoConfiguration 增加 @Lazy(false) 注解,?配置延?加??,避免分??件出? 添加分??件?判?是否已?配置?同一??例(不同的配置是不同的?例) v1.2.13 - 2019-11-26 升? PageHelper 到 5.1.11 升? MyBatis 到 3.5.3 升? MyBatis Starter 到 2.1.1 升? springboot 到 2.2.1.RELEASE v1.2.12 - 2019-06-05 升? PageHelper 到 5.1.10 v1.2.11 - 2019-05-29 升? PageHelper 到 5.1.9 升? MyBatis 到 3.5.1 升? MyBatis Starter 到 2.0.1 升? springboot 到 2.1.5.RELEASE v1.2.10 - 2018-11-11 升? PageHelper 到 5.1.8 升? springboot 到 2.1.0.RELEASE v1.2.9 - 2018-10-11 升? PageHelper 到 5.1.7 v1.2.8 由于未修改版本,仍然和 v1.2.7 相同。 v1.2.7 - 2018-09-04 升? PageHelper 到 5.1.6 v1.2.6 - 2018-09-04 升? PageHelper 到 5.1.5 v1.2.5 - 2018-04-22 升? PageHelper 到 5.1.4(默?增加????据?的支持) 升? MyBatis 到 3.4.6 v1.2.4 - 2018-04-07 升? PageHelper 到 5.1.3 升? springboot 到 2.0.1.RELEASE 增加 dialectAlias ??,允?配置自定???的 ?名,可以用于根据JDBCURL自??取????,允?通?此?方式覆盖已有的??,配置示例如(多?配置用分? ; 隔?): pagehelper.dialect-alias = oracle =com.github.pagehelper.dialect.helper.OracleDialect 增加 defaultCount ??,用于控制默?不? count ??的方法中,是否?行 count ??,默? true ??行 count ??,?是一?全局生效的??,多?据源?也是?一的行?。配置示例如: pagehelper.default-count =false v1.2.3 - 2017-09-25 修改?性?取方式,兼容 Spring Boot 1.x 和 2.x 第三方?展分??件?使用到?外?性?,配置?性要和?性名完全匹配 升? springboot 到 1.5.7.RELEASE 升? MyBatis-Starter 版本到 1.3.1 v1.2.2 - 2017-09-18 升? pagehelper 到 5.1.2 v1.2.1 - 2017-08-30 升? pagehelper 到 5.1.1 v1.2.0 - 2017-08-28 升? pagehelper 到 5.1.0 v1.1.3 - 2017-08-01 升? pagehelper 到 5.0.4 升? springboot 到 1.5.6.RELEASE v1.1.2 - 2017-06-28 by drtrang 升? pagehelper 到 5.0.3 升? springboot 到 1.5.4.RELEASE ? maven-compiler-plugin 和 maven-source-plugin ? release profile 中提出?作?全局?件,?且增加?承?性,解? PageHelperAutoConfiguration ?中的 @Override ????。 v1.1.1 - 2017-04-25 增加多?据源支持 #pr6 by yangBin666 升?分??件 PageHelper 版本到 5.0.1 升? MyBatis 版本到 3.4.4 升? Spring Boot 版本到 1.5.3.RELEASE 升? MyBatis-Starter 版本到 1.3.0 v1.1.0 - 2017-02-04 解?可能?注??次分??件的??。 增加 PageHelperProperties 注入,常用?性可以通? IDE 自?提示 Example https://github.com/abel533/MyBatis-Spring-Boot PageHelper https://github.com/pagehelper/Mybatis-PageHelper Special Configurations 一般情?下,?不需要做任何配置。 Normally, you don't need to do any configuration. 如果需要配置,可以使用如下方式?行配置: You can config PageHelper as the following: application.properties: pagehelper.propertyName =propertyValue 注意 pagehelper 配置,因?分??件根据自己的?展不同,支持的??也不同,所以不能用固定的?象接收??,所以?里使用的 Map<String,String> ,因此??名是什??里就?什?,IDE 也不?有自?提示。 ?于可配置的?性??考 如何使用分??件 。 You can configure the properties of the reference here How to use the PageHelper . Interceptor Order 如果?想要控制 ?截器?件的?序,可以通?下面注解控制: If you want to control the order in which the interceptor plug-in, you can use the following annotation control: @ AutoConfigureAfter ( PageHelperAutoConfiguration . class ) //Or @ AutoConfigureBefore ( PageHelperAutoConfiguration . class ) 感?所有?目??者!