From 71e7e1d6dd919dabef03fc2f4b6116dd0aa99a1d Mon Sep 17 00:00:00 2001 From: RuoYi Date: Thu, 19 Jan 2023 12:02:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=97=E7=AC=A6=E6=9C=AA=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E4=B8=8B=E5=88=92=E7=BA=BF=E4=B8=8D=E8=BF=9B=E8=A1=8C=E9=A9=BC?= =?UTF-8?q?=E5=B3=B0=E5=BC=8F=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/ruoyi/common/utils/StringUtils.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/StringUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/StringUtils.java index f49d57e..f2203ae 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/StringUtils.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/StringUtils.java @@ -481,7 +481,8 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils } /** - * 驼峰式命名法 例如:user_name->userName + * 驼峰式命名法 + * 例如:user_name->userName */ public static String toCamelCase(String s) { @@ -489,6 +490,10 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils { return null; } + if (s.indexOf(SEPARATOR) == -1) + { + return s; + } s = s.toLowerCase(); StringBuilder sb = new StringBuilder(s.length()); boolean upperCase = false;