diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/handler/GatewayExceptionHandler.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/handler/GatewayExceptionHandler.java index f3620103..7d19b212 100644 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/handler/GatewayExceptionHandler.java +++ b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/handler/GatewayExceptionHandler.java @@ -1,7 +1,9 @@ package com.gitee.sop.gatewaycommon.gateway.handler; import com.gitee.sop.gatewaycommon.bean.ApiContext; +import com.gitee.sop.gatewaycommon.gateway.ServerWebExchangeUtil; import com.gitee.sop.gatewaycommon.gateway.result.GatewayResult; +import com.gitee.sop.gatewaycommon.param.ApiParam; import com.gitee.sop.gatewaycommon.result.ResultExecutor; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -35,10 +37,9 @@ public class GatewayExceptionHandler implements ErrorWebExceptionHandler { public Mono handle(ServerWebExchange exchange, Throwable ex) { ResultExecutor resultExecutor = ApiContext.getApiConfig().getGatewayResultExecutor(); GatewayResult errorResult = resultExecutor.buildErrorResult(exchange, ex); - + ApiParam apiParam = ServerWebExchangeUtil.getApiParam(exchange); // 错误记录 - ServerHttpRequest request = exchange.getRequest(); - log.error("[全局异常处理]异常请求路径:{}, msg:{}", request.getPath(), ex.getMessage(), ex); + log.error("gateway网关报错,params:{}, errorMsg:{}", apiParam, ex.getMessage(), ex); // 参考AbstractErrorWebExceptionHandler if (exchange.getResponse().isCommitted()) { return Mono.error(ex); diff --git a/sop-sdk/sdk-csharp/readme.md b/sop-sdk/sdk-csharp/readme.md index d63a4034..ec8ef3c0 100644 --- a/sop-sdk/sdk-csharp/readme.md +++ b/sop-sdk/sdk-csharp/readme.md @@ -1,9 +1,8 @@ # sdk-csharp -C#对应的SDK +C#对应的SDK,由于本人使用mac开发,因此使用了.Net Core -- SDKCSharp: SDK源码,在此基础上添加接口 -- SDKTest: 测试用例 +测试用例在`Program.cs` ## 接口封装步骤