From ad302514d4281997dae108fa27ca0c441c247dae Mon Sep 17 00:00:00 2001 From: tanghc Date: Fri, 21 Feb 2020 10:55:08 +0800 Subject: [PATCH] 3.1.0 --- .../sop/gatewaycommon/zuul/param/ZuulParameterUtil.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/zuul/param/ZuulParameterUtil.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/zuul/param/ZuulParameterUtil.java index 934873f9..16af5225 100644 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/zuul/param/ZuulParameterUtil.java +++ b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/zuul/param/ZuulParameterUtil.java @@ -2,6 +2,7 @@ package com.gitee.sop.gatewaycommon.zuul.param; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; +import com.gitee.sop.gatewaycommon.manager.EnvironmentKeys; import com.gitee.sop.gatewaycommon.param.FormHttpOutputMessage; import com.gitee.sop.gatewaycommon.util.RequestUtil; import com.netflix.zuul.context.RequestContext; @@ -44,6 +45,11 @@ public class ZuulParameterUtil { * @param 参数类型 */ public static > void format(T apiParam, Consumer consumer) { + String restfulEnableValue = EnvironmentKeys.SOP_RESTFUL_ENABLE.getValue(); + // restful请求不支持动态修改参数 + if ("true".equals(restfulEnableValue)) { + return; + } RequestContext requestContext = RequestContext.getCurrentContext(); consumer.accept(apiParam); HttpServletRequest request = requestContext.getRequest();