pull/1/MERGE
tanghc 5 years ago
parent 3a6ea57226
commit 554520d4b8
  1. 10
      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(); RequestContext currentContext = RequestContext.getCurrentContext();
currentContext.setRequest(RequestUtil.wrapRequest(request)); currentContext.setRequest(RequestUtil.wrapRequest(request));
currentContext.setResponse(response); 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 * @param currentContext currentContext
*/ */
private void doValidate(RequestContext currentContext, ValidateCallback callback) { private void doValidate(RequestContext currentContext, ApiParam param, ValidateCallback callback) {
// 解析参数
ApiParam param = paramBuilder.build(currentContext);
ZuulContext.setApiParam(param);
Exception error = null; Exception error = null;
// 验证操作,这里有负责验证签名参数 // 验证操作,这里有负责验证签名参数
try { try {

Loading…
Cancel
Save