diff --git a/mybatis-flex-annotation/pom.xml b/mybatis-flex-annotation/pom.xml index 9de73b8a..1060270a 100644 --- a/mybatis-flex-annotation/pom.xml +++ b/mybatis-flex-annotation/pom.xml @@ -5,7 +5,7 @@ parent com.mybatis-flex - 1.2.4 + 1.2.5 4.0.0 diff --git a/mybatis-flex-codegen/pom.xml b/mybatis-flex-codegen/pom.xml index d3f2d1cb..81e0cc46 100644 --- a/mybatis-flex-codegen/pom.xml +++ b/mybatis-flex-codegen/pom.xml @@ -5,7 +5,7 @@ parent com.mybatis-flex - 1.2.4 + 1.2.5 4.0.0 @@ -27,7 +27,7 @@ com.mybatis-flex mybatis-flex-spring - 1.2.4 + 1.2.5 diff --git a/mybatis-flex-core/pom.xml b/mybatis-flex-core/pom.xml index 9a8bbb6a..31ef30a8 100644 --- a/mybatis-flex-core/pom.xml +++ b/mybatis-flex-core/pom.xml @@ -5,7 +5,7 @@ parent com.mybatis-flex - 1.2.4 + 1.2.5 4.0.0 @@ -22,13 +22,13 @@ com.mybatis-flex mybatis-flex-annotation - 1.2.4 + 1.2.5 com.mybatis-flex mybatis-flex-processor - 1.2.4 + 1.2.5 diff --git a/mybatis-flex-core/src/main/java/com/mybatisflex/core/FlexConsts.java b/mybatis-flex-core/src/main/java/com/mybatisflex/core/FlexConsts.java index 796e9665..a21567b5 100644 --- a/mybatis-flex-core/src/main/java/com/mybatisflex/core/FlexConsts.java +++ b/mybatis-flex-core/src/main/java/com/mybatisflex/core/FlexConsts.java @@ -20,7 +20,7 @@ package com.mybatisflex.core; */ public class FlexConsts { public static final String NAME = "MyBatis-Flex"; - public static final String VERSION = "1.2.4"; + public static final String VERSION = "1.2.5"; public static final String DEFAULT_PRIMARY_FIELD = "id"; diff --git a/mybatis-flex-core/src/main/java/com/mybatisflex/core/util/StringUtil.java b/mybatis-flex-core/src/main/java/com/mybatisflex/core/util/StringUtil.java index 18b53050..56f77eb3 100644 --- a/mybatis-flex-core/src/main/java/com/mybatisflex/core/util/StringUtil.java +++ b/mybatis-flex-core/src/main/java/com/mybatisflex/core/util/StringUtil.java @@ -253,7 +253,6 @@ public class StringUtil { * @param objs * @param function * @param - * @return */ public static String join(String delimiter, Collection objs, Function function) { if (CollectionUtil.isEmpty(objs)) { diff --git a/mybatis-flex-processor/pom.xml b/mybatis-flex-processor/pom.xml index f9691d37..bce2349a 100644 --- a/mybatis-flex-processor/pom.xml +++ b/mybatis-flex-processor/pom.xml @@ -5,7 +5,7 @@ parent com.mybatis-flex - 1.2.4 + 1.2.5 4.0.0 @@ -20,7 +20,7 @@ com.mybatis-flex mybatis-flex-annotation - 1.2.4 + 1.2.5 diff --git a/mybatis-flex-solon-plugin/pom.xml b/mybatis-flex-solon-plugin/pom.xml index 6866a900..84ea34c6 100644 --- a/mybatis-flex-solon-plugin/pom.xml +++ b/mybatis-flex-solon-plugin/pom.xml @@ -5,7 +5,7 @@ parent com.mybatis-flex - 1.2.4 + 1.2.5 4.0.0 @@ -15,7 +15,7 @@ com.mybatis-flex mybatis-flex-core - 1.2.4 + 1.2.5 diff --git a/mybatis-flex-spring-boot-starter/pom.xml b/mybatis-flex-spring-boot-starter/pom.xml index ae613959..9eae16e2 100644 --- a/mybatis-flex-spring-boot-starter/pom.xml +++ b/mybatis-flex-spring-boot-starter/pom.xml @@ -5,7 +5,7 @@ parent com.mybatis-flex - 1.2.4 + 1.2.5 4.0.0 @@ -21,7 +21,7 @@ com.mybatis-flex mybatis-flex-spring - 1.2.4 + 1.2.5 diff --git a/mybatis-flex-spring/pom.xml b/mybatis-flex-spring/pom.xml index c3de68e8..e9fcbc95 100644 --- a/mybatis-flex-spring/pom.xml +++ b/mybatis-flex-spring/pom.xml @@ -5,7 +5,7 @@ parent com.mybatis-flex - 1.2.4 + 1.2.5 4.0.0 @@ -20,7 +20,7 @@ com.mybatis-flex mybatis-flex-core - 1.2.4 + 1.2.5 diff --git a/mybatis-flex-test/mybatis-flex-native-test/pom.xml b/mybatis-flex-test/mybatis-flex-native-test/pom.xml index 7db5dae9..a44ac3e9 100644 --- a/mybatis-flex-test/mybatis-flex-native-test/pom.xml +++ b/mybatis-flex-test/mybatis-flex-native-test/pom.xml @@ -5,7 +5,7 @@ mybatis-flex-test com.mybatis-flex - 1.2.4 + 1.2.5 4.0.0 @@ -20,7 +20,7 @@ com.mybatis-flex mybatis-flex-core - 1.2.4 + 1.2.5 diff --git a/mybatis-flex-test/mybatis-flex-native-test/src/main/java/com/mybatisflex/test/DocWordsCount.java b/mybatis-flex-test/mybatis-flex-native-test/src/main/java/com/mybatisflex/test/DocWordsCount.java new file mode 100644 index 00000000..fe526910 --- /dev/null +++ b/mybatis-flex-test/mybatis-flex-native-test/src/main/java/com/mybatisflex/test/DocWordsCount.java @@ -0,0 +1,65 @@ +package com.mybatisflex.test; + +import java.io.*; + +public class DocWordsCount { + + private static long count = 0; + + public static void main(String[] args) { + String rootPath = "/Users/michael/work/git/mybatis-flex/docs"; + File rootFile = new File(rootPath); + calculate(rootFile); + System.out.println("words count: " + count); + } + + + private static void calculate(File dir){ + File[] files = dir.listFiles(pathname -> !"node_modules".equals(pathname.getName())); + if (files != null) { + for (File file : files) { + if (file.isDirectory()) { + calculate(file); + } else if (file.getName().endsWith(".md")) { + System.out.println(file); + String s = readString(file, "utf-8"); + count += s.length(); + } + } + } + } + + + private static String readString(File file, String charsetName) { + ByteArrayOutputStream baos = null; + FileInputStream fis = null; + try { + fis = new FileInputStream(file); + baos = new ByteArrayOutputStream(); + byte[] buffer = new byte[1024]; + for (int len = 0; (len = fis.read(buffer)) > 0; ) { + baos.write(buffer, 0, len); + } + return baos.toString(charsetName); + } catch (Exception e) { + e.printStackTrace(); + } finally { + closeQuietly(fis, baos); + } + return null; + } + + private static void closeQuietly(Closeable... closeables) { + if (closeables != null) { + for (Closeable closeable : closeables) { + if (closeable != null) { + try { + closeable.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + } + } +} diff --git a/mybatis-flex-test/mybatis-flex-spring-boot-test/pom.xml b/mybatis-flex-test/mybatis-flex-spring-boot-test/pom.xml index 1fb4da50..4a50fe81 100644 --- a/mybatis-flex-test/mybatis-flex-spring-boot-test/pom.xml +++ b/mybatis-flex-test/mybatis-flex-spring-boot-test/pom.xml @@ -5,7 +5,7 @@ mybatis-flex-test com.mybatis-flex - 1.2.4 + 1.2.5 4.0.0 @@ -21,7 +21,7 @@ com.mybatis-flex mybatis-flex-spring-boot-starter - 1.2.4 + 1.2.5 diff --git a/mybatis-flex-test/mybatis-flex-spring-test/pom.xml b/mybatis-flex-test/mybatis-flex-spring-test/pom.xml index efa41a6f..6109a980 100644 --- a/mybatis-flex-test/mybatis-flex-spring-test/pom.xml +++ b/mybatis-flex-test/mybatis-flex-spring-test/pom.xml @@ -5,7 +5,7 @@ mybatis-flex-test com.mybatis-flex - 1.2.4 + 1.2.5 4.0.0 @@ -20,13 +20,13 @@ com.mybatis-flex mybatis-flex-core - 1.2.4 + 1.2.5 com.mybatis-flex mybatis-flex-spring - 1.2.4 + 1.2.5 diff --git a/mybatis-flex-test/pom.xml b/mybatis-flex-test/pom.xml index 4f729b52..65553894 100644 --- a/mybatis-flex-test/pom.xml +++ b/mybatis-flex-test/pom.xml @@ -5,7 +5,7 @@ parent com.mybatis-flex - 1.2.4 + 1.2.5 4.0.0 @@ -59,7 +59,7 @@ com.mybatis-flex mybatis-flex-processor - 1.2.4 + 1.2.5