From 4827ff3a994d29307ecadf8709ae9b70663c6d17 Mon Sep 17 00:00:00 2001 From: tanghc Date: Thu, 5 Sep 2019 10:27:01 +0800 Subject: [PATCH] 2.0.0 --- README.md | 2 +- .../gitee/sop/gatewaycommon/zuul/filter/PreLimitFilter.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 36573767..5d502cb7 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ SOP封装了开放平台大部分功能包括:签名验证、统一异常处 ![架构图](https://images.gitee.com/uploads/images/2019/0821/201531_0f605f7c_332975.png "sop2.png") -> 开发者只需写微服务部分的业务代码 +> 如上图所示,整个系统运行后,开发者只需关注微服务中的业务代码,接口变更后重新部署微服务应用即可 ## 已完成列表 diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/zuul/filter/PreLimitFilter.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/zuul/filter/PreLimitFilter.java index f6b2caf6..319a5e6a 100644 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/zuul/filter/PreLimitFilter.java +++ b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/zuul/filter/PreLimitFilter.java @@ -59,7 +59,7 @@ public class PreLimitFilter extends BaseZuulFilter { if (configLimitDto.getLimitStatus() == ConfigLimitDto.LIMIT_STATUS_CLOSE) { return null; } - byte limitType = configLimitDto.getLimitType().byteValue(); + byte limitType = configLimitDto.getLimitType(); // 如果是漏桶策略 if (limitType == LimitType.LEAKY_BUCKET.getType()) { boolean acquire = limitManager.acquire(configLimitDto); @@ -109,7 +109,7 @@ public class PreLimitFilter extends BaseZuulFilter { if (limitConfigList.isEmpty()) { return null; } - Collections.sort(limitConfigList, Comparator.comparing(ConfigLimitDto::getOrderIndex)); + limitConfigList.sort(Comparator.comparing(ConfigLimitDto::getOrderIndex)); return limitConfigList.get(0); } }