From ad12893cf80767dfe30d732003368bc65b8075e0 Mon Sep 17 00:00:00 2001 From: abel533 Date: Mon, 19 Sep 2022 00:05:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E5=B8=83=201.4.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 6 +- pagehelper-spring-boot-autoconfigure/pom.xml | 2 +- .../PageHelperStandardProperties.java | 80 +++++++++++++++++++ .../pom.xml | 2 +- .../src/main/resources/application.properties | 3 +- .../pagehelper-spring-boot-sample-xml/pom.xml | 2 +- pagehelper-spring-boot-samples/pom.xml | 2 +- pagehelper-spring-boot-starter/pom.xml | 2 +- pom.xml | 4 +- 9 files changed, 94 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index c8b003a..e687ce8 100644 --- a/README.md +++ b/README.md @@ -16,10 +16,14 @@ Add the following dependency to your pom.xml: com.github.pagehelper pagehelper-spring-boot-starter - 1.4.4 + 1.4.5 ``` +## v1.4.5 - 2022-09-18 + +- 升级 PageHelper 到 5.3.2 + ## v1.4.4 - 2022-09-16 - 修复配置文件中kebab-case风格的配置项失效的问题 pr#138, by ShoWen diff --git a/pagehelper-spring-boot-autoconfigure/pom.xml b/pagehelper-spring-boot-autoconfigure/pom.xml index 1b539d7..8084031 100644 --- a/pagehelper-spring-boot-autoconfigure/pom.xml +++ b/pagehelper-spring-boot-autoconfigure/pom.xml @@ -29,7 +29,7 @@ com.github.pagehelper pagehelper-spring-boot - 1.4.4 + 1.4.5 pagehelper-spring-boot-autoconfigure pagehelper-spring-boot-autoconfigure diff --git a/pagehelper-spring-boot-autoconfigure/src/main/java/com/github/pagehelper/autoconfigure/PageHelperStandardProperties.java b/pagehelper-spring-boot-autoconfigure/src/main/java/com/github/pagehelper/autoconfigure/PageHelperStandardProperties.java index d8af4df..52febe7 100644 --- a/pagehelper-spring-boot-autoconfigure/src/main/java/com/github/pagehelper/autoconfigure/PageHelperStandardProperties.java +++ b/pagehelper-spring-boot-autoconfigure/src/main/java/com/github/pagehelper/autoconfigure/PageHelperStandardProperties.java @@ -36,6 +36,14 @@ public class PageHelperStandardProperties { private Boolean defaultCount; private String dialectAlias; private String autoDialectClass; + private Boolean useSqlserver2012; + private String countColumn; + private String replaceSql; + private String sqlCacheClass; + private String boundSqlInterceptors; + private Boolean keepOrderBy; + private Boolean keepSubSelectOrderBy; + private String sqlParser; @Autowired public PageHelperStandardProperties(PageHelperProperties properties) { @@ -171,4 +179,76 @@ public void setAutoDialectClass(String autoDialectClass) { this.autoDialectClass = autoDialectClass; Optional.ofNullable(autoDialectClass).ifPresent(properties::setAutoDialectClass); } + + public Boolean getUseSqlserver2012() { + return useSqlserver2012; + } + + public void setUseSqlserver2012(Boolean useSqlserver2012) { + this.useSqlserver2012 = useSqlserver2012; + Optional.ofNullable(useSqlserver2012).ifPresent(v -> properties.setProperty("useSqlserver2012", v.toString())); + } + + public String getCountColumn() { + return countColumn; + } + + public void setCountColumn(String countColumn) { + this.countColumn = countColumn; + Optional.ofNullable(countColumn).ifPresent(v -> properties.setProperty("countColumn", v)); + } + + public String getReplaceSql() { + return replaceSql; + } + + public void setReplaceSql(String replaceSql) { + this.replaceSql = replaceSql; + Optional.ofNullable(replaceSql).ifPresent(v -> properties.setProperty("replaceSql", v)); + } + + public String getSqlCacheClass() { + return sqlCacheClass; + } + + public void setSqlCacheClass(String sqlCacheClass) { + this.sqlCacheClass = sqlCacheClass; + Optional.ofNullable(sqlCacheClass).ifPresent(v -> properties.setProperty("sqlCacheClass", v)); + } + + public String getBoundSqlInterceptors() { + return boundSqlInterceptors; + } + + public void setBoundSqlInterceptors(String boundSqlInterceptors) { + this.boundSqlInterceptors = boundSqlInterceptors; + Optional.ofNullable(boundSqlInterceptors).ifPresent(v -> properties.setProperty("boundSqlInterceptors", v)); + } + + public Boolean getKeepOrderBy() { + return keepOrderBy; + } + + public void setKeepOrderBy(Boolean keepOrderBy) { + this.keepOrderBy = keepOrderBy; + Optional.ofNullable(keepOrderBy).ifPresent(v -> properties.setProperty("keepOrderBy", v.toString())); + } + + public Boolean getKeepSubSelectOrderBy() { + return keepSubSelectOrderBy; + } + + public void setKeepSubSelectOrderBy(Boolean keepSubSelectOrderBy) { + this.keepSubSelectOrderBy = keepSubSelectOrderBy; + Optional.ofNullable(keepSubSelectOrderBy).ifPresent(v -> properties.setProperty("keepSubSelectOrderBy", v.toString())); + } + + public String getSqlParser() { + return sqlParser; + } + + public void setSqlParser(String sqlParser) { + this.sqlParser = sqlParser; + Optional.ofNullable(sqlParser).ifPresent(v -> properties.setProperty("sqlParser", v)); + } } diff --git a/pagehelper-spring-boot-samples/pagehelper-spring-boot-sample-annotation/pom.xml b/pagehelper-spring-boot-samples/pagehelper-spring-boot-sample-annotation/pom.xml index 5d6c25a..2ae53dd 100644 --- a/pagehelper-spring-boot-samples/pagehelper-spring-boot-sample-annotation/pom.xml +++ b/pagehelper-spring-boot-samples/pagehelper-spring-boot-sample-annotation/pom.xml @@ -28,7 +28,7 @@ com.github.pagehelper pagehelper-spring-boot-samples - 1.4.4 + 1.4.5 pagehelper-spring-boot-sample-annotation jar diff --git a/pagehelper-spring-boot-samples/pagehelper-spring-boot-sample-annotation/src/main/resources/application.properties b/pagehelper-spring-boot-samples/pagehelper-spring-boot-sample-annotation/src/main/resources/application.properties index cf076b4..0a4ab4f 100644 --- a/pagehelper-spring-boot-samples/pagehelper-spring-boot-sample-annotation/src/main/resources/application.properties +++ b/pagehelper-spring-boot-samples/pagehelper-spring-boot-sample-annotation/src/main/resources/application.properties @@ -31,4 +31,5 @@ pagehelper.closeConn=true #\u6D4B\u8BD5\u5C5E\u6027\u6CE8\u5165 pagehelper.hello=\u4F60\u597D pagehelper.nihao=Hello -pagehelper.offset-as-page-num=true \ No newline at end of file +pagehelper.offset-as-page-num=true +pagehelper.count-column=* \ No newline at end of file diff --git a/pagehelper-spring-boot-samples/pagehelper-spring-boot-sample-xml/pom.xml b/pagehelper-spring-boot-samples/pagehelper-spring-boot-sample-xml/pom.xml index 14e8626..40b7093 100644 --- a/pagehelper-spring-boot-samples/pagehelper-spring-boot-sample-xml/pom.xml +++ b/pagehelper-spring-boot-samples/pagehelper-spring-boot-sample-xml/pom.xml @@ -28,7 +28,7 @@ com.github.pagehelper pagehelper-spring-boot-samples - 1.4.4 + 1.4.5 pagehelper-spring-boot-sample-xml jar diff --git a/pagehelper-spring-boot-samples/pom.xml b/pagehelper-spring-boot-samples/pom.xml index d2145ea..c5fe048 100644 --- a/pagehelper-spring-boot-samples/pom.xml +++ b/pagehelper-spring-boot-samples/pom.xml @@ -29,7 +29,7 @@ com.github.pagehelper pagehelper-spring-boot - 1.4.4 + 1.4.5 pagehelper-spring-boot-samples pom diff --git a/pagehelper-spring-boot-starter/pom.xml b/pagehelper-spring-boot-starter/pom.xml index 033aa6f..c6f47da 100644 --- a/pagehelper-spring-boot-starter/pom.xml +++ b/pagehelper-spring-boot-starter/pom.xml @@ -29,7 +29,7 @@ com.github.pagehelper pagehelper-spring-boot - 1.4.4 + 1.4.5 pagehelper-spring-boot-starter pagehelper-spring-boot-starter diff --git a/pom.xml b/pom.xml index b570080..6f108e5 100644 --- a/pom.xml +++ b/pom.xml @@ -29,7 +29,7 @@ com.github.pagehelper pagehelper-spring-boot - 1.4.4 + 1.4.5 pom pagehelper-spring-boot @@ -69,7 +69,7 @@ UTF-8 3.5.10 - 5.3.1 + 5.3.2 2.2.2 2.7.3