From 844470091e24496e31e96893ab80db01680371c2 Mon Sep 17 00:00:00 2001 From: tanghc Date: Wed, 10 Jul 2019 15:42:36 +0800 Subject: [PATCH 1/2] update --- doc/docs/_sidebar.md | 58 ++++++++++++++-------------- doc/docs/files/90100_常见问题.md | 21 ++++++++++ 2 files changed, 50 insertions(+), 29 deletions(-) diff --git a/doc/docs/_sidebar.md b/doc/docs/_sidebar.md index 3eebcb66..28cb8fb7 100644 --- a/doc/docs/_sidebar.md +++ b/doc/docs/_sidebar.md @@ -1,31 +1,31 @@ -* [首页](/?t=1562728495209) +* [首页](/?t=1562744547267) * 开发文档 - * [快速体验](files/10010_快速体验.md?t=1562728495211) - * [项目接入到SOP](files/10011_项目接入到SOP.md?t=1562728495228) - * [新增接口](files/10020_新增接口.md?t=1562728495229) - * [业务参数校验](files/10030_业务参数校验.md?t=1562728495229) - * [错误处理](files/10040_错误处理.md?t=1562728495229) - * [编写文档](files/10041_编写文档.md?t=1562728495229) - * [接口交互详解](files/10050_接口交互详解.md?t=1562728495229) - * [easyopen支持](files/10070_easyopen支持.md?t=1562728495229) - * [使用签名校验工具](files/10080_使用签名校验工具.md?t=1562728495229) - * [ISV管理](files/10085_ISV管理.md?t=1562728495229) - * [自定义路由](files/10086_自定义路由.md?t=1562728495229) - * [路由授权](files/10090_路由授权.md?t=1562728495229) - * [接口限流](files/10092_接口限流.md?t=1562728495229) - * [监控日志](files/10093_监控日志.md?t=1562728495230) - * [SDK开发](files/10095_SDK开发.md?t=1562728495230) - * [使用SpringCloudGateway](files/10096_使用SpringCloudGateway.md?t=1562728495230) - * [应用授权](files/10097_应用授权.md?t=1562728495230) - * [更改数据节点名称](files/10099_更改数据节点名称.md?t=1562728495230) - * [对接前端](files/10100_对接前端.md?t=1562728495230) - * [自定义过滤器](files/10102_自定义过滤器.md?t=1562728495230) - * [文件上传](files/10104_文件上传.md?t=1562728495230) - * [nacos注册中心](files/10106_nacos注册中心.md?t=1562728495230) - * [扩展其它注册中心](files/10107_扩展其它注册中心.md?t=1562728495230) + * [快速体验](files/10010_快速体验.md?t=1562744547269) + * [项目接入到SOP](files/10011_项目接入到SOP.md?t=1562744547286) + * [新增接口](files/10020_新增接口.md?t=1562744547286) + * [业务参数校验](files/10030_业务参数校验.md?t=1562744547287) + * [错误处理](files/10040_错误处理.md?t=1562744547287) + * [编写文档](files/10041_编写文档.md?t=1562744547287) + * [接口交互详解](files/10050_接口交互详解.md?t=1562744547287) + * [easyopen支持](files/10070_easyopen支持.md?t=1562744547287) + * [使用签名校验工具](files/10080_使用签名校验工具.md?t=1562744547287) + * [ISV管理](files/10085_ISV管理.md?t=1562744547287) + * [自定义路由](files/10086_自定义路由.md?t=1562744547287) + * [路由授权](files/10090_路由授权.md?t=1562744547287) + * [接口限流](files/10092_接口限流.md?t=1562744547288) + * [监控日志](files/10093_监控日志.md?t=1562744547288) + * [SDK开发](files/10095_SDK开发.md?t=1562744547288) + * [使用SpringCloudGateway](files/10096_使用SpringCloudGateway.md?t=1562744547288) + * [应用授权](files/10097_应用授权.md?t=1562744547288) + * [更改数据节点名称](files/10099_更改数据节点名称.md?t=1562744547288) + * [对接前端](files/10100_对接前端.md?t=1562744547288) + * [自定义过滤器](files/10102_自定义过滤器.md?t=1562744547288) + * [文件上传](files/10104_文件上传.md?t=1562744547289) + * [nacos注册中心](files/10106_nacos注册中心.md?t=1562744547289) + * [扩展其它注册中心](files/10107_扩展其它注册中心.md?t=1562744547289) * 原理分析 - * [原理分析之@ApiMapping](files/90010_原理分析之@ApiMapping.md?t=1562728495230) - * [原理分析之路由存储](files/90011_原理分析之路由存储.md?t=1562728495231) - * [原理分析之如何路由](files/90012_原理分析之如何路由.md?t=1562728495231) - * [原理分析之文档归纳](files/90013_原理分析之文档归纳.md?t=1562728495231) - * [常见问题](files/90100_常见问题.md?t=1562728495231) + * [原理分析之@ApiMapping](files/90010_原理分析之@ApiMapping.md?t=1562744547289) + * [原理分析之路由存储](files/90011_原理分析之路由存储.md?t=1562744547289) + * [原理分析之如何路由](files/90012_原理分析之如何路由.md?t=1562744547289) + * [原理分析之文档归纳](files/90013_原理分析之文档归纳.md?t=1562744547289) + * [常见问题](files/90100_常见问题.md?t=1562744547289) diff --git a/doc/docs/files/90100_常见问题.md b/doc/docs/files/90100_常见问题.md index e40a39c5..e2b4601f 100644 --- a/doc/docs/files/90100_常见问题.md +++ b/doc/docs/files/90100_常见问题.md @@ -47,3 +47,24 @@ eureka: ``` 参考:https://www.jianshu.com/p/5ad8317961b7 + +## 直接访问服务的swagger-ui.html ,提示access forbidden + +找到微服务的`OpenServiceConfig.java`,重写内部类Swagger2中的swaggerAccessProtected()方法,返回false。线上请设置成true + +```java +// 开启文档 +@Configuration +@EnableSwagger2 +public static class Swagger2 extends SwaggerSupport { + @Override + protected String getDocTitle() { + return "故事API"; + } + + @Override + protected boolean swaggerAccessProtected() { + return false; + } +} +``` \ No newline at end of file From 70a8aacd9bfeea95eef741ae85a8a14435333fe8 Mon Sep 17 00:00:00 2001 From: tanghc Date: Wed, 10 Jul 2019 17:37:50 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sop/adminserver/bean/RouteConfigDto.java | 21 +----- .../gatewaycommon/bean/ConfigLimitDto.java | 3 + .../sop/gatewaycommon/bean/RouteConfig.java | 71 ++----------------- .../gatewaycommon/bean/RouteConfigDto.java | 37 ---------- .../gateway/filter/LimitFilter.java | 3 +- .../limit/DefaultLimitManager.java | 5 +- .../manager/DefaultRouteConfigManager.java | 6 +- .../manager/RouteConfigManager.java | 5 +- .../zuul/filter/PreLimitFilter.java | 7 +- .../gateway/manager/DbRouteConfigManager.java | 18 ++--- 10 files changed, 23 insertions(+), 153 deletions(-) delete mode 100644 sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/bean/RouteConfigDto.java diff --git a/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/bean/RouteConfigDto.java b/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/bean/RouteConfigDto.java index 5a6fc6ca..478857ff 100644 --- a/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/bean/RouteConfigDto.java +++ b/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/bean/RouteConfigDto.java @@ -8,26 +8,11 @@ import lombok.Data; @Data public class RouteConfigDto { + /** + * 路由id + */ private String routeId; - /** 限流策略,1:漏桶策略,2:令牌桶策略, 数据库字段:limit_type */ - private Byte limitType; - - /** 每秒可处理请求数, 数据库字段:exec_count_per_second */ - private Integer execCountPerSecond; - - /** 返回的错误码, 数据库字段:limit_code */ - private String limitCode; - - /** 返回的错误信息, 数据库字段:limit_msg */ - private String limitMsg; - - /** 令牌桶容量, 数据库字段:token_bucket_count */ - private Integer tokenBucketCount; - - /** 限流开启状态,1:开启,0关闭, 数据库字段:limit_status */ - private Byte limitStatus; - /** * 状态,0:待审核,1:启用,2:禁用 */ diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/bean/ConfigLimitDto.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/bean/ConfigLimitDto.java index 0d6a94dd..1d1b339f 100644 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/bean/ConfigLimitDto.java +++ b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/bean/ConfigLimitDto.java @@ -16,6 +16,9 @@ import java.util.concurrent.atomic.AtomicLong; @Data public class ConfigLimitDto { + public static final byte LIMIT_STATUS_OPEN = 1; + public static final byte LIMIT_STATUS_CLOSE = 0; + /** 数据库字段:id */ private Long id; diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/bean/RouteConfig.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/bean/RouteConfig.java index 1e7c3af8..8c1abe2d 100644 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/bean/RouteConfig.java +++ b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/bean/RouteConfig.java @@ -1,16 +1,6 @@ package com.gitee.sop.gatewaycommon.bean; -import com.google.common.cache.CacheBuilder; -import com.google.common.cache.CacheLoader; -import com.google.common.cache.LoadingCache; -import com.google.common.util.concurrent.RateLimiter; -import lombok.AccessLevel; import lombok.Data; -import lombok.Getter; -import lombok.Setter; - -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicLong; /** * @author tanghc @@ -19,73 +9,20 @@ import java.util.concurrent.atomic.AtomicLong; public class RouteConfig { public static final byte STATUS_ENABLE = 1; - public static final byte LIMIT_STATUS_CLOSE = 0; + /** + * 路由id + */ private String routeId; - /** 限流策略,1:漏桶策略,2:令牌桶策略, 数据库字段:limit_type */ - private Byte limitType = 1; - - /** 每秒可处理请求数, 数据库字段:exec_count_per_second */ - private Integer execCountPerSecond = 10; - - /** 返回的错误码, 数据库字段:limit_code */ - private String limitCode = "isp.service-busy"; - - /** 返回的错误信息, 数据库字段:limit_msg */ - private String limitMsg = "服务繁忙,请稍后再试"; - - /** 令牌桶容量, 数据库字段:token_bucket_count */ - private Integer tokenBucketCount = 10; - - /** 限流开启状态,1:开启,0关闭, 数据库字段:limit_status */ - private Byte limitStatus = LIMIT_STATUS_CLOSE; - /** * 状态,0:待审核,1:启用,2:禁用。默认启用 */ private Byte status = STATUS_ENABLE; - /** - * 漏桶计数器 - */ - private LoadingCache counter = CacheBuilder.newBuilder() - .expireAfterWrite(2, TimeUnit.SECONDS) - .build(new CacheLoader() { - @Override - public AtomicLong load(Long seconds) throws Exception { - return new AtomicLong(0); - } - }); - - /** - * 令牌桶 - */ - @Getter(AccessLevel.PRIVATE) - @Setter(AccessLevel.PRIVATE) - private volatile RateLimiter rateLimiter; - - public synchronized void initRateLimiter() { - rateLimiter = RateLimiter.create(tokenBucketCount); - } - - /** - * 获取令牌桶 - * @return - */ - public RateLimiter fetchRateLimiter() { - if (rateLimiter == null) { - synchronized (this.routeId) { - if (rateLimiter == null) { - rateLimiter = RateLimiter.create(tokenBucketCount); - } - } - } - return rateLimiter; - } - /** * 是否启用 + * * @return true:启用 */ public boolean enable() { diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/bean/RouteConfigDto.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/bean/RouteConfigDto.java deleted file mode 100644 index 65750bee..00000000 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/bean/RouteConfigDto.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.gitee.sop.gatewaycommon.bean; - -import lombok.Data; - -/** - * @author tanghc - */ -@Data -public class RouteConfigDto { - - private String routeId; - - /** 限流策略,1:漏桶策略,2:令牌桶策略, 数据库字段:limit_type */ - private Byte limitType; - - /** 每秒可处理请求数, 数据库字段:exec_count_per_second */ - private Integer execCountPerSecond; - - /** 返回的错误码, 数据库字段:limit_code */ - private String limitCode; - - /** 返回的错误信息, 数据库字段:limit_msg */ - private String limitMsg; - - /** 令牌桶容量, 数据库字段:token_bucket_count */ - private Integer tokenBucketCount; - - /** 限流开启状态,1:开启,0关闭, 数据库字段:limit_status */ - private Byte limitStatus; - - /** - * 状态,0:待审核,1:启用,2:禁用 - */ - private Byte status; - - -} diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/filter/LimitFilter.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/filter/LimitFilter.java index 084560bb..ae7573c4 100644 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/filter/LimitFilter.java +++ b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/filter/LimitFilter.java @@ -2,7 +2,6 @@ package com.gitee.sop.gatewaycommon.gateway.filter; import com.gitee.sop.gatewaycommon.bean.ApiConfig; import com.gitee.sop.gatewaycommon.bean.ConfigLimitDto; -import com.gitee.sop.gatewaycommon.bean.RouteConfig; import com.gitee.sop.gatewaycommon.exception.ApiException; import com.gitee.sop.gatewaycommon.gateway.GatewayContext; import com.gitee.sop.gatewaycommon.limit.LimitManager; @@ -41,7 +40,7 @@ public class LimitFilter implements GlobalFilter, Ordered { return null; } // 单个限流功能未开启 - if (configLimitDto.getLimitStatus() == RouteConfig.LIMIT_STATUS_CLOSE) { + if (configLimitDto.getLimitStatus() == ConfigLimitDto.LIMIT_STATUS_CLOSE) { return null; } byte limitType = configLimitDto.getLimitType().byteValue(); diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/limit/DefaultLimitManager.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/limit/DefaultLimitManager.java index 45c5187c..42b58b6e 100644 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/limit/DefaultLimitManager.java +++ b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/limit/DefaultLimitManager.java @@ -1,7 +1,6 @@ package com.gitee.sop.gatewaycommon.limit; import com.gitee.sop.gatewaycommon.bean.ConfigLimitDto; -import com.gitee.sop.gatewaycommon.bean.RouteConfig; import com.google.common.cache.LoadingCache; import lombok.extern.slf4j.Slf4j; @@ -16,7 +15,7 @@ public class DefaultLimitManager implements LimitManager { @Override public double acquireToken(ConfigLimitDto routeConfig) { - if (routeConfig.getLimitStatus() == RouteConfig.LIMIT_STATUS_CLOSE) { + if (routeConfig.getLimitStatus() == ConfigLimitDto.LIMIT_STATUS_CLOSE) { return 0; } if (LimitType.LEAKY_BUCKET.getType() == routeConfig.getLimitType().byteValue()) { @@ -28,7 +27,7 @@ public class DefaultLimitManager implements LimitManager { @Override public boolean acquire(ConfigLimitDto routeConfig) { - if (routeConfig.getLimitStatus() == RouteConfig.LIMIT_STATUS_CLOSE) { + if (routeConfig.getLimitStatus() == ConfigLimitDto.LIMIT_STATUS_CLOSE) { return true; } if (LimitType.TOKEN_BUCKET.getType() == routeConfig.getLimitType().byteValue()) { diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/manager/DefaultRouteConfigManager.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/manager/DefaultRouteConfigManager.java index 800a675f..1989082e 100644 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/manager/DefaultRouteConfigManager.java +++ b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/manager/DefaultRouteConfigManager.java @@ -1,7 +1,6 @@ package com.gitee.sop.gatewaycommon.manager; import com.gitee.sop.gatewaycommon.bean.RouteConfig; -import com.gitee.sop.gatewaycommon.bean.RouteConfigDto; import com.gitee.sop.gatewaycommon.util.MyBeanUtil; import java.util.Map; @@ -28,8 +27,8 @@ public class DefaultRouteConfigManager implements RouteConfigManager { } @Override - public void update(RouteConfigDto routeConfigDto) { - this.doUpdate(routeConfigDto.getRouteId(), routeConfigDto); + public void update(RouteConfig routeConfig) { + this.doUpdate(routeConfig.getRouteId(), routeConfig); } protected void doUpdate(String routeId, Object res) { @@ -40,7 +39,6 @@ public class DefaultRouteConfigManager implements RouteConfigManager { routeConfigMap.put(routeId, routeConfig); } MyBeanUtil.copyPropertiesIgnoreNull(res, routeConfig); - routeConfig.initRateLimiter(); } protected RouteConfig newRouteConfig() { diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/manager/RouteConfigManager.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/manager/RouteConfigManager.java index 74e5dcd5..b7c022ce 100644 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/manager/RouteConfigManager.java +++ b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/manager/RouteConfigManager.java @@ -2,7 +2,6 @@ package com.gitee.sop.gatewaycommon.manager; import com.gitee.sop.gatewaycommon.bean.BeanInitializer; import com.gitee.sop.gatewaycommon.bean.RouteConfig; -import com.gitee.sop.gatewaycommon.bean.RouteConfigDto; /** * 路由配置管理 @@ -11,9 +10,9 @@ import com.gitee.sop.gatewaycommon.bean.RouteConfigDto; public interface RouteConfigManager extends BeanInitializer { /** * 更新路由配置 - * @param routeConfigDto 路由配置 + * @param routeConfig 路由配置 */ - void update(RouteConfigDto routeConfigDto); + void update(RouteConfig routeConfig); /** * 获取路由配置 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 63ce69ea..ddf0d314 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 @@ -2,7 +2,6 @@ package com.gitee.sop.gatewaycommon.zuul.filter; import com.gitee.sop.gatewaycommon.bean.ApiConfig; import com.gitee.sop.gatewaycommon.bean.ConfigLimitDto; -import com.gitee.sop.gatewaycommon.bean.RouteConfig; import com.gitee.sop.gatewaycommon.exception.ApiException; import com.gitee.sop.gatewaycommon.limit.LimitManager; import com.gitee.sop.gatewaycommon.limit.LimitType; @@ -26,8 +25,6 @@ import java.util.List; */ public class PreLimitFilter extends BaseZuulFilter { - public static final int LIMIT_STATUS_OPEN = 1; - @Override protected FilterType getFilterType() { return FilterType.PRE; @@ -52,7 +49,7 @@ public class PreLimitFilter extends BaseZuulFilter { return null; } // 单个限流功能未开启 - if (configLimitDto.getLimitStatus() == RouteConfig.LIMIT_STATUS_CLOSE) { + if (configLimitDto.getLimitStatus() == ConfigLimitDto.LIMIT_STATUS_CLOSE) { return null; } byte limitType = configLimitDto.getLimitType().byteValue(); @@ -94,7 +91,7 @@ public class PreLimitFilter extends BaseZuulFilter { if (configLimitDto == null) { continue; } - if (configLimitDto.getLimitStatus().intValue() == LIMIT_STATUS_OPEN) { + if (configLimitDto.getLimitStatus().intValue() == ConfigLimitDto.LIMIT_STATUS_OPEN) { limitConfigList.add(configLimitDto); } } diff --git a/sop-gateway/src/main/java/com/gitee/sop/gateway/manager/DbRouteConfigManager.java b/sop-gateway/src/main/java/com/gitee/sop/gateway/manager/DbRouteConfigManager.java index 02b5c626..2a8dee88 100644 --- a/sop-gateway/src/main/java/com/gitee/sop/gateway/manager/DbRouteConfigManager.java +++ b/sop-gateway/src/main/java/com/gitee/sop/gateway/manager/DbRouteConfigManager.java @@ -7,7 +7,6 @@ import com.gitee.sop.gateway.mapper.ConfigRouteLimitMapper; import com.gitee.sop.gatewaycommon.bean.BaseRouteDefinition; import com.gitee.sop.gatewaycommon.bean.ChannelMsg; import com.gitee.sop.gatewaycommon.bean.RouteConfig; -import com.gitee.sop.gatewaycommon.bean.RouteConfigDto; import com.gitee.sop.gatewaycommon.bean.TargetRoute; import com.gitee.sop.gatewaycommon.manager.DefaultRouteConfigManager; import com.gitee.sop.gatewaycommon.manager.RouteRepositoryContext; @@ -39,21 +38,12 @@ public class DbRouteConfigManager extends DefaultRouteConfigManager { loadAllRoute(); Query query = new Query(); - configRouteBaseMapper.list(query) .stream() .forEach(configRouteBase -> { String key = configRouteBase.getRouteId(); putVal(key, configRouteBase); }); - - configRouteLimitMapper.list(query) - .stream() - .forEach(configRouteLimit -> { - String key = configRouteLimit.getRouteId(); - putVal(key, configRouteLimit); - }); - } protected void loadAllRoute() { @@ -84,15 +74,15 @@ public class DbRouteConfigManager extends DefaultRouteConfigManager { ZookeeperContext.listenPath(path, nodeCache -> { String nodeData = new String(nodeCache.getCurrentData().getData()); ChannelMsg channelMsg = JSON.parseObject(nodeData, ChannelMsg.class); - final RouteConfigDto routeConfigDto = JSON.parseObject(channelMsg.getData(), RouteConfigDto.class); + final RouteConfig routeConfig = JSON.parseObject(channelMsg.getData(), RouteConfig.class); switch (channelMsg.getOperation()) { case "reload": - log.info("重新加载路由配置信息,routeConfigDto:{}", routeConfigDto); + log.info("重新加载路由配置信息,routeConfigDto:{}", routeConfig); load(); break; case "update": - log.info("更新路由配置信息,routeConfigDto:{}", routeConfigDto); - update(routeConfigDto); + log.info("更新路由配置信息,routeConfigDto:{}", routeConfig); + update(routeConfig); break; } });