From 554520d4b877736a0a6029c88f90da55fe0a304b Mon Sep 17 00:00:00 2001 From: tanghc Date: Thu, 16 Jan 2020 15:10:04 +0800 Subject: [PATCH] 3.0.0 --- .../gitee/sop/gatewaycommon/zuul/ValidateService.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/zuul/ValidateService.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/zuul/ValidateService.java index 3ad55621..46632c89 100644 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/zuul/ValidateService.java +++ b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/zuul/ValidateService.java @@ -37,7 +37,10 @@ public class ValidateService { RequestContext currentContext = RequestContext.getCurrentContext(); currentContext.setRequest(RequestUtil.wrapRequest(request)); currentContext.setResponse(response); - doValidate(currentContext, callback); + // 解析参数 + ApiParam param = paramBuilder.build(currentContext); + ZuulContext.setApiParam(param); + doValidate(currentContext, param, callback); } /** @@ -45,10 +48,7 @@ public class ValidateService { * * @param currentContext currentContext */ - private void doValidate(RequestContext currentContext, ValidateCallback callback) { - // 解析参数 - ApiParam param = paramBuilder.build(currentContext); - ZuulContext.setApiParam(param); + private void doValidate(RequestContext currentContext, ApiParam param, ValidateCallback callback) { Exception error = null; // 验证操作,这里有负责验证签名参数 try {