diff --git a/starters/dubbo-spring-boot-starter/src/main/java/com/schbrain/framework/autoconfigure/dubbo/filter/DubboExceptionFilter.java b/starters/dubbo-spring-boot-starter/src/main/java/com/schbrain/framework/autoconfigure/dubbo/filter/DubboExceptionFilter.java index 8620b5edcb4002aa966b0420bae8109c457bf5e6..a8959fc8356d451eb77f82a529271cae31e113fc 100644 --- a/starters/dubbo-spring-boot-starter/src/main/java/com/schbrain/framework/autoconfigure/dubbo/filter/DubboExceptionFilter.java +++ b/starters/dubbo-spring-boot-starter/src/main/java/com/schbrain/framework/autoconfigure/dubbo/filter/DubboExceptionFilter.java @@ -37,13 +37,14 @@ public class DubboExceptionFilter extends ExceptionFilter { } private void logErrorDetail(Invoker invoker, Throwable exception) { - RpcServiceContext context = RpcContext.getServiceContext(); + RpcServiceContext context = RpcContext.getCurrentServiceContext(); String arguments = Arrays.toString(context.getArguments()); String serviceName = invoker.getInterface().getSimpleName(); String methodName = context.getMethodName(); String remoteHost = context.getRemoteHost(); String remoteApplication = context.getRemoteApplicationName(); - log.error("Catch rpc exception, client: {}@{}, target: {}#{}, args: {}", remoteApplication, remoteHost, serviceName, methodName, arguments, exception); + String errorMessage = ExceptionUtil.getMessage(exception); + log.error("Catch rpc exception: {}, client: {}@{}, target: {}#{}, args: {}", errorMessage, remoteApplication, remoteHost, serviceName, methodName, arguments, exception); } -} \ No newline at end of file +} diff --git a/starters/mybatis-spring-boot-starter/src/main/java/com/schbrain/framework/autoconfigure/mybatis/biz/BizIdHelper.java b/starters/mybatis-spring-boot-starter/src/main/java/com/schbrain/framework/autoconfigure/mybatis/biz/BizIdHelper.java index 79aca83404263799ebd0c75e9ea2420abcdbc5a1..0ef748a9e7077714a75c96dff667c393e531cf16 100644 --- a/starters/mybatis-spring-boot-starter/src/main/java/com/schbrain/framework/autoconfigure/mybatis/biz/BizIdHelper.java +++ b/starters/mybatis-spring-boot-starter/src/main/java/com/schbrain/framework/autoconfigure/mybatis/biz/BizIdHelper.java @@ -44,7 +44,7 @@ public class BizIdHelper { private static TableFieldInfo getBizIdFieldInfo(TableInfo tableInfo, Field bizIdField) { List fieldInfoList = tableInfo.getFieldList().stream() - .filter(fieldInfo -> fieldInfo.getField() == bizIdField) + .filter(fieldInfo -> fieldInfo.getField().equals(bizIdField)) .collect(Collectors.toList()); if (CollectionUtils.isEmpty(fieldInfoList)) { throw new BaseException(String.format("%s can not be found in fieldList", bizIdField.getName()));