From a26bbc36caab48274c039f4babdba94741594699 Mon Sep 17 00:00:00 2001 From: smallchill Date: Sun, 24 Feb 2019 13:41:12 +0800 Subject: [PATCH] :tada: 2.0.7.RELEASE --- blade-core-boot/pom.xml | 2 +- blade-core-cloud/pom.xml | 2 +- blade-core-launch/pom.xml | 2 +- blade-core-log/pom.xml | 2 +- blade-core-mybatis/pom.xml | 2 +- blade-core-secure/pom.xml | 2 +- blade-core-swagger/pom.xml | 2 +- blade-core-tool/pom.xml | 2 +- .../core/tool/utils/StringUtil.java | 39 +++++++++++++++++++ pom.xml | 4 +- 10 files changed, 49 insertions(+), 10 deletions(-) diff --git a/blade-core-boot/pom.xml b/blade-core-boot/pom.xml index a3e8526..4d98550 100644 --- a/blade-core-boot/pom.xml +++ b/blade-core-boot/pom.xml @@ -5,7 +5,7 @@ org.springblade blade-tool - 2.0.6 + 2.0.7 4.0.0 diff --git a/blade-core-cloud/pom.xml b/blade-core-cloud/pom.xml index 5e86140..efb7cec 100644 --- a/blade-core-cloud/pom.xml +++ b/blade-core-cloud/pom.xml @@ -5,7 +5,7 @@ blade-tool org.springblade - 2.0.6 + 2.0.7 4.0.0 diff --git a/blade-core-launch/pom.xml b/blade-core-launch/pom.xml index 4c5802e..829628f 100644 --- a/blade-core-launch/pom.xml +++ b/blade-core-launch/pom.xml @@ -5,7 +5,7 @@ blade-tool org.springblade - 2.0.6 + 2.0.7 4.0.0 diff --git a/blade-core-log/pom.xml b/blade-core-log/pom.xml index 9d394a7..8ad0825 100644 --- a/blade-core-log/pom.xml +++ b/blade-core-log/pom.xml @@ -5,7 +5,7 @@ blade-tool org.springblade - 2.0.6 + 2.0.7 4.0.0 diff --git a/blade-core-mybatis/pom.xml b/blade-core-mybatis/pom.xml index 6234967..0b4a98e 100644 --- a/blade-core-mybatis/pom.xml +++ b/blade-core-mybatis/pom.xml @@ -5,7 +5,7 @@ blade-tool org.springblade - 2.0.6 + 2.0.7 4.0.0 diff --git a/blade-core-secure/pom.xml b/blade-core-secure/pom.xml index c1ca318..e0c59f6 100644 --- a/blade-core-secure/pom.xml +++ b/blade-core-secure/pom.xml @@ -5,7 +5,7 @@ blade-tool org.springblade - 2.0.6 + 2.0.7 4.0.0 diff --git a/blade-core-swagger/pom.xml b/blade-core-swagger/pom.xml index 470f2c5..3a5e996 100644 --- a/blade-core-swagger/pom.xml +++ b/blade-core-swagger/pom.xml @@ -5,7 +5,7 @@ blade-tool org.springblade - 2.0.6 + 2.0.7 4.0.0 diff --git a/blade-core-tool/pom.xml b/blade-core-tool/pom.xml index 4452f75..5e7b58f 100644 --- a/blade-core-tool/pom.xml +++ b/blade-core-tool/pom.xml @@ -6,7 +6,7 @@ org.springblade blade-tool - 2.0.6 + 2.0.7 4.0.0 diff --git a/blade-core-tool/src/main/java/org/springblade/core/tool/utils/StringUtil.java b/blade-core-tool/src/main/java/org/springblade/core/tool/utils/StringUtil.java index 3929dc4..7d0c02d 100644 --- a/blade-core-tool/src/main/java/org/springblade/core/tool/utils/StringUtil.java +++ b/blade-core-tool/src/main/java/org/springblade/core/tool/utils/StringUtil.java @@ -1365,6 +1365,7 @@ public class StringUtil extends org.springframework.util.StringUtils { * @return String */ public static String humpToUnderline(String para) { + para = lowerFirst(para); StringBuilder sb = new StringBuilder(para); int temp = 0; for (int i = 0; i < para.length(); i++) { @@ -1376,6 +1377,44 @@ public class StringUtil extends org.springframework.util.StringUtils { return sb.toString().toLowerCase(); } + /** + * 横线转驼峰 + * + * @param para 字符串 + * @return String + */ + public static String lineToHump(String para) { + StringBuilder result = new StringBuilder(); + String[] a = para.split("-"); + for (String s : a) { + if (result.length() == 0) { + result.append(s.toLowerCase()); + } else { + result.append(s.substring(0, 1).toUpperCase()); + result.append(s.substring(1).toLowerCase()); + } + } + return result.toString(); + } + + /** + * 驼峰转横线 + * + * @param para 字符串 + * @return String + */ + public static String humpToLine(String para) { + para = lowerFirst(para); + StringBuilder sb = new StringBuilder(para); + int temp = 0; + for (int i = 0; i < para.length(); i++) { + if (Character.isUpperCase(para.charAt(i))) { + sb.insert(i + temp, "-"); + temp += 1; + } + } + return sb.toString().toLowerCase(); + } } diff --git a/pom.xml b/pom.xml index 0d1a7dd..623f761 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springblade blade-tool - 2.0.6 + 2.0.7 pom blade-tool @@ -36,7 +36,7 @@ - 2.0.6 + 2.0.7 1.8 3.8.0