From 4939013da682b55d305ba5fb56a4cc9550e485c7 Mon Sep 17 00:00:00 2001 From: Suomm <1474983351@qq.com> Date: Sun, 2 Jul 2023 21:16:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=88=A4=E6=96=AD=20getter=20=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E4=B8=8D=E6=AD=A3=E7=A1=AE=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/mybatisflex/processor/util/StrUtil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mybatis-flex-processor/src/main/java/com/mybatisflex/processor/util/StrUtil.java b/mybatis-flex-processor/src/main/java/com/mybatisflex/processor/util/StrUtil.java index e314eba9..8774f1b4 100644 --- a/mybatis-flex-processor/src/main/java/com/mybatisflex/processor/util/StrUtil.java +++ b/mybatis-flex-processor/src/main/java/com/mybatisflex/processor/util/StrUtil.java @@ -114,9 +114,9 @@ public class StrUtil { public static boolean isGetterMethod(String methodName, String property) { if (methodName.startsWith("get") && methodName.length() > 3) { - return firstCharToUpperCase(property).equals(methodName.substring(3)); + return firstCharToUpperCase(property).concat("()").equals(methodName.substring(3)); } else if (methodName.startsWith("is") && methodName.length() > 2) { - return firstCharToUpperCase(property).equals(methodName.substring(2)); + return firstCharToUpperCase(property).concat("()").equals(methodName.substring(2)); } else { return false; }