diff --git a/pom.xml b/pom.xml index f434148..4aa77b1 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.github.yulichang mybatis-plus-join - 1.3.0 + 1.3.1 mybatis-plus-join An enhanced toolkit of Mybatis-Plus to simplify development. https://github.com/yulichang/mybatis-plus-join @@ -52,4 +52,144 @@ provided + + + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.9.1 + + + attach-javadocs + + jar + + + + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.8 + true + + ossrh + https://oss.sonatype.org/ + true + 30 + + + + + + + disable-javadoc-doclint + + [1.8,) + + + -Xdoclint:none + + + + release + + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.9.1 + + + attach-javadocs + + jar + + + + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.8 + true + + ossrh + https://oss.sonatype.org/ + true + 30 + + + + + + + + + ossrh + https://oss.sonatype.org/content/repositories/snapshots + + + ossrh + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + + diff --git a/src/main/java/com/github/yulichang/injector/MPJSqlInjector.java b/src/main/java/com/github/yulichang/injector/MPJSqlInjector.java index e0ac705..7224d22 100644 --- a/src/main/java/com/github/yulichang/injector/MPJSqlInjector.java +++ b/src/main/java/com/github/yulichang/injector/MPJSqlInjector.java @@ -82,10 +82,16 @@ public class MPJSqlInjector extends DefaultSqlInjector { private List getJoinMethod() { List list = new ArrayList<>(); - String version = MybatisPlusVersion.getVersion(); - String[] split = version.split("\\."); - int v1 = Integer.parseInt(split[0]); - int v2 = Integer.parseInt(split[1]); + int v1, v2; + try { + String version = MybatisPlusVersion.getVersion(); + String[] split = version.split("\\."); + v1 = Integer.parseInt(split[0]); + v2 = Integer.parseInt(split[1]); + } catch (Exception e) { + v1 = 3; + v2 = 4; + } if ((v1 == 3 && v2 >= 5) || v1 > 3) { list.add(new SelectJoinCount(SqlMethod.SELECT_JOIN_COUNT.getMethod())); list.add(new SelectJoinOne(SqlMethod.SELECT_JOIN_ONE.getMethod()));