From 7eec231eb5c928610c224e6a3aff47ceb2fc8753 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=B5=A9=E6=9D=B0?= <897546244@qq.com> Date: Mon, 15 May 2023 21:26:58 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0configuration-processor=EF=BC=8C=E5=AE=9E=E7=8E=B0yaml?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E8=87=AA=E5=8A=A8=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mybatis-flex-spring-boot-starter/pom.xml | 10 ++++++++++ pom.xml | 12 ++++++++++++ 2 files changed, 22 insertions(+) diff --git a/mybatis-flex-spring-boot-starter/pom.xml b/mybatis-flex-spring-boot-starter/pom.xml index 7f6fb74f..ae613959 100644 --- a/mybatis-flex-spring-boot-starter/pom.xml +++ b/mybatis-flex-spring-boot-starter/pom.xml @@ -29,6 +29,16 @@ spring-boot-autoconfigure + + org.springframework.boot + spring-boot-configuration-processor + + + + org.springframework.boot + spring-boot-autoconfigure-processor + + org.mybatis.scripting mybatis-freemarker diff --git a/pom.xml b/pom.xml index eb517b03..f793cf4a 100644 --- a/pom.xml +++ b/pom.xml @@ -133,6 +133,18 @@ ${spring-boot.version} + + org.springframework.boot + spring-boot-configuration-processor + ${spring-boot.version} + + + + org.springframework.boot + spring-boot-autoconfigure-processor + ${spring-boot.version} + + org.springframework.boot spring-boot-starter-web From be413e218e3f1609eebd0598bfc46553645476e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=B5=A9=E6=9D=B0?= <897546244@qq.com> Date: Mon, 15 May 2023 21:27:47 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E5=88=86=E9=A1=B5=E4=B8=8A=E9=99=90=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/mybatisflex/core/BaseMapper.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mybatis-flex-core/src/main/java/com/mybatisflex/core/BaseMapper.java b/mybatis-flex-core/src/main/java/com/mybatisflex/core/BaseMapper.java index bc6b3480..366ba3cb 100644 --- a/mybatis-flex-core/src/main/java/com/mybatisflex/core/BaseMapper.java +++ b/mybatis-flex-core/src/main/java/com/mybatisflex/core/BaseMapper.java @@ -595,9 +595,10 @@ public interface BaseMapper { //重置 selectColumns CPI.setSelectColumns(queryWrapper, selectColumns); - - int offset = page.getPageSize() * (page.getPageNumber() - 1); - queryWrapper.limit(offset, page.getPageSize()); + //分页pageSize,最大值限制 + int pageSize = Math.min(page.getPageSize(), 10000); + int offset = pageSize * (page.getPageNumber() - 1); + queryWrapper.limit(offset, pageSize); List rows = selectListByQuery(queryWrapper); page.setRecords(rows); return page;