From 9194482522ed3bdc55b5c321152d71abb1265faa Mon Sep 17 00:00:00 2001 From: tanghc Date: Wed, 21 Aug 2019 20:52:48 +0800 Subject: [PATCH] 2.0 --- doc/docs/files/10070_easyopen支持.md | 52 ++++++++++++------- .../files/10096_使用SpringCloudGateway.md | 2 - .../gatewaycommon/validate/ApiValidator.java | 3 +- 3 files changed, 35 insertions(+), 22 deletions(-) diff --git a/doc/docs/files/10070_easyopen支持.md b/doc/docs/files/10070_easyopen支持.md index 6edb8f01..65bddb70 100644 --- a/doc/docs/files/10070_easyopen支持.md +++ b/doc/docs/files/10070_easyopen支持.md @@ -10,21 +10,39 @@ SOP对easyopen项目提供了很好的支持,如果您的服务端使用了eas ```xml - - com.gitee.sop - sop-service-common - 1.0.0-SNAPSHOT - - - org.springframework.cloud - spring-cloud-starter-netflix-eureka-client - - - net.oschina.durcframework - easyopen - 1.16.1 - - + + com.gitee.sop + sop-service-common + 2.0.0-SNAPSHOT + + + + + org.springframework.cloud + spring-cloud-starter-alibaba-nacos-discovery + 0.2.2.RELEASE + + + com.alibaba.nacos + nacos-client + + + + + com.alibaba.nacos + nacos-client + 1.1.0 + + + + net.oschina.durcframework + easyopen + 1.16.1 + + ``` easyopen版本必须升级到1.16.1 @@ -49,9 +67,7 @@ public class SopConfig extends EasyopenServiceConfiguration { ```java @Configuration public class ZuulConfig extends EasyopenZuulConfiguration { - static { - new ManagerInitializer(); - } + } ``` diff --git a/doc/docs/files/10096_使用SpringCloudGateway.md b/doc/docs/files/10096_使用SpringCloudGateway.md index ee88a206..ab83ff58 100644 --- a/doc/docs/files/10096_使用SpringCloudGateway.md +++ b/doc/docs/files/10096_使用SpringCloudGateway.md @@ -69,5 +69,3 @@ public class GatewayConfig extends AlipayGatewayConfiguration {...} ``` 修改完毕,重启sop-gateway - -运行SpringCloudGatewayClientPostTest测试用例。 \ No newline at end of file diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/validate/ApiValidator.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/validate/ApiValidator.java index 75ee6e42..264e65da 100644 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/validate/ApiValidator.java +++ b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/validate/ApiValidator.java @@ -59,7 +59,7 @@ public class ApiValidator implements Validator { @Override public void validate(ApiParam param) { checkIP(param); - + checkEnable(param); ApiConfig apiConfig = ApiContext.getApiConfig(); if (apiConfig.isIgnoreValidate() || param.fetchIgnoreValidate()) { if (log.isDebugEnabled()) { @@ -67,7 +67,6 @@ public class ApiValidator implements Validator { } return; } - checkEnable(param); // 需要验证签名,先校验appKey,后校验签名,顺序不能变 checkAppKey(param); checkSign(param);