From a22bfb84dbd69b095ea7de773b8bd14dbdab65b7 Mon Sep 17 00:00:00 2001 From: tanghc Date: Tue, 18 Aug 2020 15:44:42 +0800 Subject: [PATCH 01/15] 4.0.3 --- .../files/90011_原理分析之如何存储路由.md | 42 +++++++++---------- .../config/AbstractConfiguration.java | 2 +- 2 files changed, 21 insertions(+), 23 deletions(-) diff --git a/doc/docs/files/90011_原理分析之如何存储路由.md b/doc/docs/files/90011_原理分析之如何存储路由.md index 7bb00f6d..662248c7 100644 --- a/doc/docs/files/90011_原理分析之如何存储路由.md +++ b/doc/docs/files/90011_原理分析之如何存储路由.md @@ -15,14 +15,9 @@ this.publisher.publishEvent(new HeartbeatEvent(this, this.nacosWatchIndex.getAnd ```java public class AbstractConfiguration implements ApplicationContextAware, ApplicationListener { - /** - * nacos事件监听,每次微服务变化会触发这个方法 - * @see org.springframework.cloud.alibaba.nacos.discovery.NacosWatch NacosWatch - * @param heartbeatEvent - */ - @Override - public void onApplicationEvent(HeartbeatEvent heartbeatEvent) { - ...这里加载路由信息 + @EventListener(classes = HeartbeatEvent.class) + public void listenEvent(ApplicationEvent heartbeatEvent) { + // 有服务注册进来 } } ``` @@ -32,23 +27,26 @@ public class AbstractConfiguration implements ApplicationContextAware, Applicati 加载路由伪代码如下: ```java -public void onApplicationEvent(HeartbeatEvent heartbeatEvent) { - // 获取nacos中的服务实例列表 - List allInstances = namingService.getAllInstances(serviceName); - for(Instance instance : allInstances) { - // 微服务提供的接口 - String url = "http://" + instance.getIp + ":" + instance.getPort + "/sop/routes"; - ResponseEntity responseEntity = restTemplate.getForEntity(url, String.class); - if (responseEntity.getStatusCode() == HttpStatus.OK) { - // 返回来的路由信息 - String body = responseEntity.getBody(); - ...加载路由到本地 - } +@Override +public void onAddInstance(InstanceDefinition instance) { + String serviceName = instance.getServiceId(); + String url = getRouteRequestUrl(instance); + log.info("拉取路由配置,serviceId: {}, url: {}", serviceName, url); + ResponseEntity responseEntity = getRestTemplate().getForEntity(url, String.class); + if (responseEntity.getStatusCode() == HttpStatus.OK) { + String body = responseEntity.getBody(); + ServiceRouteInfo serviceRouteInfo = JSON.parseObject(body, ServiceRouteInfo.class); + baseRouteCache.load(serviceRouteInfo, callback -> routesProcessor.saveRoutes(serviceRouteInfo, instance)); + } else { + log.error("拉取路由配置异常,url: {}, status: {}, body: {}", url, responseEntity.getStatusCodeValue(), responseEntity.getBody()); } } ``` -完整代码可参看`com.gitee.sop.gatewaycommon.manager.ServiceRoutesLoader.java` +参考代码: + +- `com.gitee.sop.gatewaycommon.route.RegistryListener`以及实现类 +- `com.gitee.sop.gatewaycommon.route.ServiceRouteListener` 路由的存储方式是一个Map,key为路由id,即接口名+版本号。 @@ -56,7 +54,7 @@ public void onApplicationEvent(HeartbeatEvent heartbeatEvent) { /** * key:nameVersion */ -private Map nameVersionTargetRouteMap; +private static final Map routes = synchronizedMap(new LinkedHashMap<>()); ``` 因为客户端调用接口都会传递一个接口名和版本号,因此通过这两个字段能够很快查询出路由信息,进行路由转发操作。 diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/config/AbstractConfiguration.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/config/AbstractConfiguration.java index 834a9dbe..170db99b 100644 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/config/AbstractConfiguration.java +++ b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/config/AbstractConfiguration.java @@ -81,7 +81,7 @@ public class AbstractConfiguration implements ApplicationContextAware, Applicati * @param heartbeatEvent */ @EventListener(classes = HeartbeatEvent.class) - public void listenNacosEvent(ApplicationEvent heartbeatEvent) { + public void listenEvent(ApplicationEvent heartbeatEvent) { // 没有启动完毕先等待 if (!isStartupCompleted) { lock.lock(); From 27d5b0135cdceca954faf9b7fcd78b0d74efcfe6 Mon Sep 17 00:00:00 2001 From: tanghc Date: Wed, 19 Aug 2020 09:56:20 +0800 Subject: [PATCH 02/15] 4.0.3 --- .../com/gitee/sop/gatewaycommon/gateway/filter/IndexFilter.java | 1 - 1 file changed, 1 deletion(-) diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/filter/IndexFilter.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/filter/IndexFilter.java index 7c5b5a5d..b5f9efaf 100644 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/filter/IndexFilter.java +++ b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/filter/IndexFilter.java @@ -5,7 +5,6 @@ import com.gitee.sop.gatewaycommon.bean.SopConstants; import com.gitee.sop.gatewaycommon.exception.ApiException; import com.gitee.sop.gatewaycommon.gateway.ServerWebExchangeUtil; import com.gitee.sop.gatewaycommon.gateway.route.GatewayForwardChooser; -import com.gitee.sop.gatewaycommon.manager.EnvironmentKeys; import com.gitee.sop.gatewaycommon.param.ApiParam; import com.gitee.sop.gatewaycommon.route.ForwardInfo; import com.gitee.sop.gatewaycommon.util.RouteInterceptorUtil; From 4d260c72ab28435998522727fe7eb988ba9acbda Mon Sep 17 00:00:00 2001 From: tanghc Date: Wed, 19 Aug 2020 16:20:23 +0800 Subject: [PATCH 03/15] 4.0.3 --- .../sop/gatewaycommon/param/ApiParam.java | 84 ++----------------- .../gatewaycommon/param/BaseParamBuilder.java | 76 ----------------- .../sop/gatewaycommon/param/ParamBuilder.java | 14 ---- 3 files changed, 8 insertions(+), 166 deletions(-) delete mode 100644 sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/param/BaseParamBuilder.java delete mode 100644 sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/param/ParamBuilder.java diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/param/ApiParam.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/param/ApiParam.java index c7c5483e..b7f855b7 100644 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/param/ApiParam.java +++ b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/param/ApiParam.java @@ -16,7 +16,6 @@ import java.util.UUID; public class ApiParam extends JSONObject implements Param { - public ApiParam() { } @@ -25,39 +24,15 @@ public class ApiParam extends JSONObject implements Param { } private String requestId = UUID.randomUUID().toString().replace("-", ""); - private boolean ignoreSign; - private boolean ignoreValidate; - - private String restName; - private String restVersion; private String serviceId; private String ip; - private boolean restful; private boolean mergeResult = true; private boolean isGrayRequest; private transient UploadContext uploadContext; - public static ApiParam createRestfulApiParam(String path) { - ApiParam apiParam = new ApiParam(); - apiParam.setName(path); - apiParam.setVersion(""); - apiParam.setRestful(true); - apiParam.setMergeResult(false); - return apiParam; - } - - public void fitNameVersion() { - if (restName != null) { - this.put(ParamNames.API_NAME, restName); - } - if (restVersion != null) { - this.put(ParamNames.VERSION_NAME, restVersion); - } - } - public static ApiParam build(Map map) { ApiParam apiParam = new ApiParam(); for (Map.Entry entry : map.entrySet()) { @@ -82,25 +57,8 @@ public class ApiParam extends JSONObject implements Param { return sign; } - /** - * 是否忽略验证签名 - * - * @return 返回true,忽略签名 - */ - public boolean fetchIgnoreSign() { - return ignoreSign; - } - - public void setIgnoreSign(boolean ignoreSign) { - this.ignoreSign = ignoreSign; - } - - public boolean fetchIgnoreValidate() { - return ignoreValidate; - } - - public void setIgnoreValidate(boolean ignoreValidate) { - this.ignoreValidate = ignoreValidate; + public void setName(String name) { + put(ParamNames.API_NAME, name); } /** @@ -108,15 +66,7 @@ public class ApiParam extends JSONObject implements Param { */ @Override public String fetchName() { - String name = getString(ParamNames.API_NAME); - if (name == null) { - name = this.restName; - } - return name; - } - - public void setName(String name) { - this.restName = name; + return getString(ParamNames.API_NAME); } public String fetchNameVersion() { @@ -139,15 +89,7 @@ public class ApiParam extends JSONObject implements Param { */ @Override public String fetchVersion() { - String version = getString(ParamNames.VERSION_NAME); - if (version == null) { - version = this.restVersion; - } - return version; - } - - public void setVersion(String version) { - this.restVersion = version; + return getString(ParamNames.VERSION_NAME); } /** @@ -162,6 +104,8 @@ public class ApiParam extends JSONObject implements Param { put(ParamNames.APP_KEY_NAME, appKey); } + + /** * 参数,urlencode后的 */ @@ -244,14 +188,6 @@ public class ApiParam extends JSONObject implements Param { return super.hashCode(); } - public void setRestName(String restName) { - this.restName = restName; - } - - public void setRestVersion(String restVersion) { - this.restVersion = restVersion; - } - public void setIp(String ip) { this.ip = ip; } @@ -284,12 +220,8 @@ public class ApiParam extends JSONObject implements Param { this.mergeResult = mergeResult; } - public boolean fetchRestful() { - return restful; - } - - public void setRestful(boolean restful) { - this.restful = restful; + public void setRequestId(String requestId) { + this.requestId = requestId; } public String fetchRequestId() { diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/param/BaseParamBuilder.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/param/BaseParamBuilder.java deleted file mode 100644 index d223a1f1..00000000 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/param/BaseParamBuilder.java +++ /dev/null @@ -1,76 +0,0 @@ -package com.gitee.sop.gatewaycommon.param; - -import com.gitee.sop.gatewaycommon.bean.RouteDefinition; -import com.gitee.sop.gatewaycommon.bean.TargetRoute; -import com.gitee.sop.gatewaycommon.manager.RouteRepository; -import com.gitee.sop.gatewaycommon.manager.RouteRepositoryContext; -import com.gitee.sop.gatewaycommon.message.ErrorEnum; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.BooleanUtils; - -import java.util.Optional; - -/** - * @author tanghc - */ -@Slf4j -public abstract class BaseParamBuilder implements ParamBuilder { - - /** - * 构建请求参数 - * - * @param ctx 请求request - * @return 返回请求参数 - */ - public abstract ApiParam buildRequestParams(T ctx); - - /** - * 返回客户端ip - * - * @param ctx 请求request - * @return 返回ip - */ - public abstract String getIP(T ctx); - - /** - * 将版本号添加到header中 - * - * @param ctx 请求request - * @param headerName headerName - * @param version 版本号 - */ - public abstract void setVersionInHeader(T ctx, String headerName, String version); - - @Override - public ApiParam build(T ctx) { - ApiParam apiParam = this.buildRequestParams(ctx); - this.processApiParam(apiParam, ctx); - this.initOtherProperty(apiParam); - apiParam.setIp(this.getIP(ctx)); - this.setVersionInHeader(ctx, ParamNames.HEADER_VERSION_NAME, apiParam.fetchVersion()); - return apiParam; - } - - protected void processApiParam(ApiParam param, T ctx) { - - } - - protected void initOtherProperty(ApiParam apiParam) { - RouteRepository routeRepository = RouteRepositoryContext.getRouteRepository(); - if (routeRepository == null) { - log.error("RouteRepositoryContext.setRouteRepository()方法未使用"); - throw ErrorEnum.ISP_UNKNOWN_ERROR.getErrorMeta().getException(); - } - - String nameVersion = Optional.ofNullable(apiParam.fetchNameVersion()).orElse(String.valueOf(System.currentTimeMillis())); - TargetRoute targetRoute = routeRepository.get(nameVersion); - Integer ignoreValidate = Optional.ofNullable(targetRoute) - .map(TargetRoute::getRouteDefinition) - .map(RouteDefinition::getIgnoreValidate) - // 默认不忽略 - .orElse(BooleanUtils.toInteger(false)); - apiParam.setIgnoreValidate(BooleanUtils.toBoolean(ignoreValidate)); - } - -} - diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/param/ParamBuilder.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/param/ParamBuilder.java deleted file mode 100644 index c17fb688..00000000 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/param/ParamBuilder.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.gitee.sop.gatewaycommon.param; - -/** - * @author tanghc - */ -public interface ParamBuilder { - /** - * 从request提取参数 - * @param request - * @return 返回ApiParam - * @throws Exception - */ - ApiParam build(T request); -} From e86296ad5bb7b055315f46ff29a75772e980508e Mon Sep 17 00:00:00 2001 From: tanghc Date: Thu, 20 Aug 2020 09:25:17 +0800 Subject: [PATCH 04/15] 4.0.3 --- sop-common/sop-service-common/pom.xml | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/sop-common/sop-service-common/pom.xml b/sop-common/sop-service-common/pom.xml index 582ab35d..009cafb6 100644 --- a/sop-common/sop-service-common/pom.xml +++ b/sop-common/sop-service-common/pom.xml @@ -36,11 +36,21 @@ commons-io + + commons-fileupload + commons-fileupload + + com.alibaba fastjson + + org.hibernate + hibernate-validator + + com.alibaba.cloud @@ -53,11 +63,6 @@ 5.1.4.RELEASE true - - net.oschina.durcframework - easyopen - true - io.springfox springfox-swagger2 @@ -68,11 +73,6 @@ swagger-annotations true - - org.springframework.boot - spring-boot-autoconfigure - true - junit junit @@ -102,7 +102,6 @@ javax.servlet-api provided - From 77ecbb668c6b23a66feaa9b4a57f831e24f6175d Mon Sep 17 00:00:00 2001 From: tanghc Date: Thu, 20 Aug 2020 09:53:42 +0800 Subject: [PATCH 05/15] 4.0.3 --- doc/.gitignore | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 doc/.gitignore diff --git a/doc/.gitignore b/doc/.gitignore new file mode 100644 index 00000000..1739d49e --- /dev/null +++ b/doc/.gitignore @@ -0,0 +1,27 @@ +/target/ +!.mvn/wrapper/maven-wrapper.jar + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr +*.png + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +/build/ + From f6f412d1027ea2301cdc255c9b7076a841ddfec5 Mon Sep 17 00:00:00 2001 From: tanghc Date: Thu, 20 Aug 2020 11:19:25 +0800 Subject: [PATCH 06/15] 4.0.3 --- .../java/com/gitee/sop/adminserver/entity/IsvInfo.java | 9 --------- .../main/java/com/gitee/sop/gateway/entity/IsvInfo.java | 9 --------- sop-mysql5.6以下版本.sql | 3 --- sop.sql | 3 --- 4 files changed, 24 deletions(-) diff --git a/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/entity/IsvInfo.java b/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/entity/IsvInfo.java index 40413dd7..9e1b85dd 100644 --- a/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/entity/IsvInfo.java +++ b/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/entity/IsvInfo.java @@ -28,15 +28,6 @@ public class IsvInfo { /** appKey, 数据库字段:app_key */ private String appKey; - /** 不再使用,转移到isv_keys表 */ - private String secret = ""; - - /** 公钥,不再使用,转移到isv_keys表 数据库字段:pub_key */ - private String pubKey; - - /** 私钥,不再使用,转移到isv_keys表 数据库字段:pri_key */ - private String priKey; - /** 1启用,2禁用, 数据库字段:status */ private Byte status; diff --git a/sop-gateway/src/main/java/com/gitee/sop/gateway/entity/IsvInfo.java b/sop-gateway/src/main/java/com/gitee/sop/gateway/entity/IsvInfo.java index 04da1f23..7b9d4e25 100644 --- a/sop-gateway/src/main/java/com/gitee/sop/gateway/entity/IsvInfo.java +++ b/sop-gateway/src/main/java/com/gitee/sop/gateway/entity/IsvInfo.java @@ -28,15 +28,6 @@ public class IsvInfo { /** appKey, 数据库字段:app_key */ private String appKey; - /** secret, 数据库字段:secret */ - private String secret; - - /** 公钥, 数据库字段:pub_key */ - private String pubKey; - - /** 私钥, 数据库字段:pri_key */ - private String priKey; - /** 1启用,2禁用, 数据库字段:status */ private Byte status; diff --git a/sop-mysql5.6以下版本.sql b/sop-mysql5.6以下版本.sql index d93a27ff..54f00aa6 100644 --- a/sop-mysql5.6以下版本.sql +++ b/sop-mysql5.6以下版本.sql @@ -139,9 +139,6 @@ CREATE TABLE `config_route_limit` ( CREATE TABLE `isv_info` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `app_key` VARCHAR(100) NOT NULL COMMENT 'appKey', - `secret` VARCHAR(200) DEFAULT NULL COMMENT 'secret', - `pub_key` TEXT COMMENT '公钥', - `pri_key` TEXT COMMENT '私钥', `status` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0' COMMENT '1启用,2禁用', `sign_type` TINYINT(4) NOT NULL DEFAULT '1' COMMENT '1:RSA2,2:MD5', `remark` VARCHAR(128) DEFAULT NULL COMMENT '备注', diff --git a/sop.sql b/sop.sql index 801c0371..c9af1cee 100644 --- a/sop.sql +++ b/sop.sql @@ -141,9 +141,6 @@ CREATE TABLE `config_route_limit` ( CREATE TABLE `isv_info` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `app_key` varchar(100) NOT NULL COMMENT 'appKey', - `secret` varchar(200) DEFAULT NULL COMMENT 'secret', - `pub_key` text COMMENT '公钥', - `pri_key` text COMMENT '私钥', `status` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '1启用,2禁用', `sign_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1:RSA2,2:MD5', `remark` varchar(128) DEFAULT NULL COMMENT '备注', From 25fa143ddaf0e67842713930fe18160ada44835d Mon Sep 17 00:00:00 2001 From: tanghc Date: Thu, 20 Aug 2020 11:32:33 +0800 Subject: [PATCH 07/15] 4.0.3 --- .../com/gitee/sop/gatewaycommon/bean/RouteDefinition.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/bean/RouteDefinition.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/bean/RouteDefinition.java index 004623bf..6ef93959 100644 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/bean/RouteDefinition.java +++ b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/bean/RouteDefinition.java @@ -1,9 +1,7 @@ package com.gitee.sop.gatewaycommon.bean; import lombok.Data; -import org.springframework.cloud.gateway.route.Route; -import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -77,10 +75,4 @@ public class RouteDefinition { */ private int needToken; - /** - * 是否是兼容模式,即使用了@ApiAbility注解 - */ - private int compatibleMode; - - private Route route; } \ No newline at end of file From 45ceebc34ba121c2d04d9f2d7ec9d92e99a1a1a3 Mon Sep 17 00:00:00 2001 From: tanghc Date: Thu, 20 Aug 2020 11:38:38 +0800 Subject: [PATCH 08/15] 4.0.3 --- doc/docs/files/90100_常见问题.md | 53 +------------------------------- 1 file changed, 1 insertion(+), 52 deletions(-) diff --git a/doc/docs/files/90100_常见问题.md b/doc/docs/files/90100_常见问题.md index c852eb15..7ab7489a 100644 --- a/doc/docs/files/90100_常见问题.md +++ b/doc/docs/files/90100_常见问题.md @@ -1,10 +1,5 @@ # 常见问题 -## 在zuul过滤器中获取请求参数 - -```java -ApiParam param = ZuulContext.getApiParam(); -``` ## 在SpringCloudGateway中获取请求参数 @@ -15,41 +10,15 @@ ApiParam apiParam = ServerWebExchangeUtil.getApiParam(exchange); ## 微服务端如何获取appId等参数 ```java -OpenContext openContext = ServiceContext.getCurrentContext().getOpenContext(); -String appId = openContext.getAppId(); +String app_id = request.getParameter("app_id"); ``` -## 在其它地方获取业务参数 - -```java -OpenContext openContext = ServiceContext.getCurrentContext().getOpenContext(); -Story bizObject = (Story)openContext.getBizObject(); - -或 - -OpenContext openContext = ServiceContext.getCurrentContext().getOpenContext(); -Story bizObject = openContext.getBizObject(Story.class); -``` ## 如何关闭签名验证 - 针对某一个接口关闭签名验证 `@Open(value = "alipay.story.get", ignoreValidate = true)` -- 针对所有接口关闭签名验证 - -```java -@Configuration -public class ZuulConfig extends AlipayZuulConfiguration { - - static { - ... - ApiConfig.getInstance().setIgnoreValidate(true); - ... - } - -} -``` ## 注册到eureka显示hostname,非ip @@ -103,26 +72,6 @@ yml添加: ribbon.ReadTimeout= 60000 ``` -## 指定了context-path(拉取路由404) - -微服务项目定义了`server.servlet.context-path=/story-service`,同时必须指定: - -```properties -spring.cloud.nacos.discovery.metadata.context-path=${server.servlet.context-path} -``` - -yml配置如下: - -```yaml -spring: - cloud: - nacos: - discovery: - metadata: - context-path: ${server.servlet.context-path} -``` - -不然网关无法拉取路由信息 ## 其它微服务没有开放接口,需要排除 From 7468ce352455babdf8537b493539a9360ea79d62 Mon Sep 17 00:00:00 2001 From: tanghc Date: Thu, 20 Aug 2020 12:24:08 +0800 Subject: [PATCH 09/15] 4.0.3 --- .../bean/AbstractTargetRoute.java | 32 ------- .../gatewaycommon/bean/ServiceDefinition.java | 26 ++++++ .../sop/gatewaycommon/bean/TargetRoute.java | 10 +-- .../gateway/filter/EnvGrayFilter.java | 2 +- .../gateway/route/GatewayRouteCache.java | 90 ++++++++++++++----- .../gateway/route/GatewayRouteRepository.java | 37 +------- .../gateway/route/GatewayTargetRoute.java | 25 ++++-- .../gatewaycommon/manager/BaseRouteCache.java | 90 ------------------- .../route/BaseForwardChooser.java | 2 +- .../route/ServiceRouteListener.java | 10 +-- .../gatewaycommon/validate/ApiValidator.java | 2 +- .../mapper/ConfigServiceRouteMapper.java | 2 +- 12 files changed, 125 insertions(+), 203 deletions(-) delete mode 100644 sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/bean/AbstractTargetRoute.java create mode 100644 sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/bean/ServiceDefinition.java delete mode 100644 sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/manager/BaseRouteCache.java diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/bean/AbstractTargetRoute.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/bean/AbstractTargetRoute.java deleted file mode 100644 index 65b40cc2..00000000 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/bean/AbstractTargetRoute.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.gitee.sop.gatewaycommon.bean; - -/** - * @author tanghc - */ -public abstract class AbstractTargetRoute implements TargetRoute { - - private ServiceRouteInfo serviceRouteInfo; - private RouteDefinition routeDefinition; - private T targetRoute; - - public AbstractTargetRoute(ServiceRouteInfo serviceRouteInfo, RouteDefinition routeDefinition, T targetRoute) { - this.serviceRouteInfo = serviceRouteInfo; - this.routeDefinition = routeDefinition; - this.targetRoute = targetRoute; - } - - @Override - public ServiceRouteInfo getServiceRouteInfo() { - return serviceRouteInfo; - } - - @Override - public RouteDefinition getRouteDefinition() { - return routeDefinition; - } - - @Override - public T getTargetRouteDefinition() { - return targetRoute; - } -} diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/bean/ServiceDefinition.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/bean/ServiceDefinition.java new file mode 100644 index 00000000..ab6764bd --- /dev/null +++ b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/bean/ServiceDefinition.java @@ -0,0 +1,26 @@ +package com.gitee.sop.gatewaycommon.bean; + +import lombok.Data; + +import java.util.Date; +import java.util.List; + +/** + * @author tanghc + */ +@Data +public class ServiceDefinition { + + /** + * 服务名称,对应spring.application.name + */ + private String serviceId; + + public ServiceDefinition(String serviceId) { + this.serviceId = serviceId; + } + + public String fetchServiceIdLowerCase() { + return serviceId.toLowerCase(); + } +} \ No newline at end of file diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/bean/TargetRoute.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/bean/TargetRoute.java index f522d49a..32ea5569 100644 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/bean/TargetRoute.java +++ b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/bean/TargetRoute.java @@ -3,14 +3,14 @@ package com.gitee.sop.gatewaycommon.bean; /** * @author tanghc */ -public interface TargetRoute { +public interface TargetRoute { /** * 返回服务信息 * * @return 返回服务信息 */ - ServiceRouteInfo getServiceRouteInfo(); + ServiceDefinition getServiceDefinition(); /** * 返回微服务路由对象 @@ -19,10 +19,4 @@ public interface TargetRoute { */ RouteDefinition getRouteDefinition(); - /** - * 返回网关路由对象 - * - * @return 返回网关路由对象 - */ - T getTargetRouteDefinition(); } diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/filter/EnvGrayFilter.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/filter/EnvGrayFilter.java index 84dbbed6..0bece971 100644 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/filter/EnvGrayFilter.java +++ b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/filter/EnvGrayFilter.java @@ -32,7 +32,7 @@ public class EnvGrayFilter implements GlobalFilter, Ordered { if (targetRoute == null) { return chain.filter(exchange); } - String serviceId = targetRoute.getServiceRouteInfo().fetchServiceIdLowerCase(); + String serviceId = targetRoute.getServiceDefinition().fetchServiceIdLowerCase(); // 如果服务在灰度阶段,返回一个灰度版本号 String version = envGrayManager.getVersion(serviceId, nameVersion); if (version != null && envGrayManager.containsKey(serviceId, apiParam.fetchAppKey())) { diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/route/GatewayRouteCache.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/route/GatewayRouteCache.java index 3e47b41c..abd7ecaa 100644 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/route/GatewayRouteCache.java +++ b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/route/GatewayRouteCache.java @@ -1,46 +1,88 @@ package com.gitee.sop.gatewaycommon.gateway.route; +import com.alibaba.fastjson.JSON; import com.gitee.sop.gatewaycommon.bean.RouteDefinition; +import com.gitee.sop.gatewaycommon.bean.ServiceDefinition; import com.gitee.sop.gatewaycommon.bean.ServiceRouteInfo; -import com.gitee.sop.gatewaycommon.manager.BaseRouteCache; +import com.gitee.sop.gatewaycommon.manager.RouteLoader; import com.gitee.sop.gatewaycommon.manager.RouteRepository; -import org.springframework.beans.BeanUtils; -import org.springframework.cloud.gateway.filter.FilterDefinition; +import lombok.extern.slf4j.Slf4j; +import org.springframework.util.DigestUtils; -import java.net.URI; +import java.nio.charset.StandardCharsets; +import java.util.HashMap; import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.function.Consumer; import java.util.stream.Collectors; /** * @author tanghc */ -public class GatewayRouteCache extends BaseRouteCache { +@Slf4j +public class GatewayRouteCache implements RouteLoader { + + /** + * KEY:serviceId, value: md5 + */ + private Map serviceIdMd5Map = new HashMap<>(); + + private RouteRepository routeRepository; public GatewayRouteCache(RouteRepository routeRepository) { - super(routeRepository); + this.routeRepository = routeRepository; } @Override - protected GatewayTargetRoute buildTargetRoute(ServiceRouteInfo serviceRouteInfo, RouteDefinition routeDefinition) { - org.springframework.cloud.gateway.route.RouteDefinition targetRoute = new org.springframework.cloud.gateway.route.RouteDefinition(); - targetRoute.setId(routeDefinition.getId()); - String path = routeDefinition.getPath(); - if (path != null && path.contains("{") && path.contains("}")) { - path = path.replace('{', '?'); - path = path.replace('}', '?'); + public void load(ServiceRouteInfo serviceRouteInfo, Consumer callback) { + try { + String serviceId = serviceRouteInfo.getServiceId(); + String newMd5 = buildMd5(serviceRouteInfo.getRouteDefinitionList()); + String oldMd5 = serviceIdMd5Map.get(serviceId); + if (Objects.equals(newMd5, oldMd5)) { + return; + } + serviceIdMd5Map.put(serviceId, newMd5); + + List routeDefinitionList = serviceRouteInfo.getRouteDefinitionList(); + for (RouteDefinition routeDefinition : routeDefinitionList) { + this.add(serviceId, routeDefinition); + if (log.isDebugEnabled()) { + log.debug("新增路由:{}", JSON.toJSONString(routeDefinition)); + } + } + this.routeRepository.refresh(); + callback.accept(null); + } catch (Exception e) { + log.error("加载路由信息失败,serviceRouteInfo:{}", serviceRouteInfo, e); } - targetRoute.setUri(URI.create(routeDefinition.getUri() + "/" + path)); - targetRoute.setOrder(routeDefinition.getOrder()); - // 添加过滤器 - List filterDefinitionList = routeDefinition.getFilters() - .stream() - .map(filter -> { - FilterDefinition filterDefinition = new FilterDefinition(); - BeanUtils.copyProperties(filter, filterDefinition); - return filterDefinition; - }) + } + + public void add(String serviceId, RouteDefinition routeDefinition) { + GatewayTargetRoute targetRoute = new GatewayTargetRoute(new ServiceDefinition(serviceId), routeDefinition); + routeRepository.add(targetRoute); + } + + /** + * 构建路由id MD5 + * + * @param routeDefinitionList 路由列表 + * @return 返回MD5 + */ + private String buildMd5(List routeDefinitionList) { + List routeIdList = routeDefinitionList.stream() + .map(JSON::toJSONString) + .sorted() .collect(Collectors.toList()); - return new GatewayTargetRoute(serviceRouteInfo, routeDefinition, targetRoute); + String md5Source = org.apache.commons.lang3.StringUtils.join(routeIdList, ""); + return DigestUtils.md5DigestAsHex(md5Source.getBytes(StandardCharsets.UTF_8)); + } + + @Override + public void remove(String serviceId) { + serviceIdMd5Map.remove(serviceId); + routeRepository.deleteAll(serviceId); } } diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/route/GatewayRouteRepository.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/route/GatewayRouteRepository.java index b1aceee3..7ff6c428 100644 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/route/GatewayRouteRepository.java +++ b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/route/GatewayRouteRepository.java @@ -1,19 +1,15 @@ package com.gitee.sop.gatewaycommon.gateway.route; -import com.gitee.sop.gatewaycommon.bean.AbstractTargetRoute; import com.gitee.sop.gatewaycommon.bean.RouteDefinition; import com.gitee.sop.gatewaycommon.manager.RouteRepository; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cloud.gateway.event.RefreshRoutesEvent; import org.springframework.cloud.gateway.route.Route; import org.springframework.cloud.gateway.route.RouteLocator; import org.springframework.cloud.gateway.route.builder.RouteLocatorBuilder; import org.springframework.context.ApplicationContext; -import org.springframework.util.AntPathMatcher; -import org.springframework.util.PathMatcher; import reactor.core.publisher.Flux; import java.util.Collection; @@ -32,8 +28,6 @@ import static java.util.Collections.synchronizedMap; @Slf4j public class GatewayRouteRepository implements RouteRepository, RouteLocator { - private final PathMatcher pathMatcher = new AntPathMatcher(); - private static final Map routes = synchronizedMap(new LinkedHashMap<>()); @Autowired @@ -56,7 +50,7 @@ public class GatewayRouteRepository implements RouteRepository routeDefinitionList = routes.values() .stream() - .map(AbstractTargetRoute::getRouteDefinition) + .map(GatewayTargetRoute::getRouteDefinition) .collect(Collectors.toList()); routeDefinitionList.forEach(routeDefinition -> builder.route(routeDefinition.getId(), r -> r.path(routeDefinition.getPath()) @@ -75,32 +69,7 @@ public class GatewayRouteRepository implements RouteRepository entry : routes.entrySet()) { - // /food/get/?id? - String pattern = entry.getKey(); - if (this.pathMatcher.match(pattern, id)) { - return clone(id, entry.getValue()); - } - } - return null; - } - - private GatewayTargetRoute clone(String path, GatewayTargetRoute gatewayTargetRoute) { - String prefix = "/" + gatewayTargetRoute.getServiceRouteInfo().getServiceId(); - if (path.startsWith(prefix)) { - path = path.substring(prefix.length()); - } - RouteDefinition routeDefinition = gatewayTargetRoute.getRouteDefinition(); - RouteDefinition newRouteDefinition = new RouteDefinition(); - BeanUtils.copyProperties(routeDefinition, newRouteDefinition); - newRouteDefinition.setPath(path); - return new GatewayTargetRoute(gatewayTargetRoute.getServiceRouteInfo() - , newRouteDefinition - , gatewayTargetRoute.getTargetRouteDefinition()); + return routes.get(id); } @@ -136,7 +105,7 @@ public class GatewayRouteRepository implements RouteRepository idList = routes.values().stream() - .filter(zuulTargetRoute -> StringUtils.equalsIgnoreCase(serviceId, zuulTargetRoute.getServiceRouteInfo().getServiceId())) + .filter(zuulTargetRoute -> StringUtils.equalsIgnoreCase(serviceId, zuulTargetRoute.getServiceDefinition().getServiceId())) .map(zuulTargetRoute -> zuulTargetRoute.getRouteDefinition().getId()) .collect(Collectors.toList()); diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/route/GatewayTargetRoute.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/route/GatewayTargetRoute.java index f2239305..8249da2a 100644 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/route/GatewayTargetRoute.java +++ b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/route/GatewayTargetRoute.java @@ -1,15 +1,30 @@ package com.gitee.sop.gatewaycommon.gateway.route; -import com.gitee.sop.gatewaycommon.bean.AbstractTargetRoute; import com.gitee.sop.gatewaycommon.bean.RouteDefinition; -import com.gitee.sop.gatewaycommon.bean.ServiceRouteInfo; +import com.gitee.sop.gatewaycommon.bean.ServiceDefinition; +import com.gitee.sop.gatewaycommon.bean.TargetRoute; /** * @author tanghc */ -public class GatewayTargetRoute extends AbstractTargetRoute { +public class GatewayTargetRoute implements TargetRoute { - public GatewayTargetRoute(ServiceRouteInfo serviceRouteInfo, RouteDefinition routeDefinition, org.springframework.cloud.gateway.route.RouteDefinition targetRoute) { - super(serviceRouteInfo, routeDefinition, targetRoute); + private ServiceDefinition serviceDefinition; + private RouteDefinition routeDefinition; + + + public GatewayTargetRoute(ServiceDefinition serviceDefinition, RouteDefinition routeDefinition) { + this.serviceDefinition = serviceDefinition; + this.routeDefinition = routeDefinition; + } + + @Override + public ServiceDefinition getServiceDefinition() { + return serviceDefinition; + } + + @Override + public RouteDefinition getRouteDefinition() { + return routeDefinition; } } diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/manager/BaseRouteCache.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/manager/BaseRouteCache.java deleted file mode 100644 index 0c0ace23..00000000 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/manager/BaseRouteCache.java +++ /dev/null @@ -1,90 +0,0 @@ -package com.gitee.sop.gatewaycommon.manager; - -import com.alibaba.fastjson.JSON; -import com.gitee.sop.gatewaycommon.bean.RouteDefinition; -import com.gitee.sop.gatewaycommon.bean.ServiceRouteInfo; -import com.gitee.sop.gatewaycommon.bean.TargetRoute; -import lombok.extern.slf4j.Slf4j; -import org.springframework.util.DigestUtils; - -import java.nio.charset.StandardCharsets; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.function.Consumer; -import java.util.stream.Collectors; - -/** - * @author tanghc - */ -@Slf4j -public abstract class BaseRouteCache implements RouteLoader { - - /** - * KEY:serviceId, value: md5 - */ - private Map serviceIdMd5Map = new HashMap<>(); - - private RouteRepository routeRepository; - - /** - * 构建目标路由对象,zuul和gateway定义的路由对象 - * - * @param serviceRouteInfo 路由服务对象 - * @param gatewayRouteDefinition 路由对象 - * @return 返回目标路由对象 - */ - protected abstract T buildTargetRoute(ServiceRouteInfo serviceRouteInfo, RouteDefinition gatewayRouteDefinition); - - public BaseRouteCache(RouteRepository routeRepository) { - this.routeRepository = routeRepository; - } - - @Override - public void load(ServiceRouteInfo serviceRouteInfo, Consumer callback) { - try { - String serviceId = serviceRouteInfo.getServiceId(); - String newMd5 = buildMd5(serviceRouteInfo.getRouteDefinitionList()); - String oldMd5 = serviceIdMd5Map.get(serviceId); - if (Objects.equals(newMd5, oldMd5)) { - return; - } - serviceIdMd5Map.put(serviceId, newMd5); - - List routeDefinitionList = serviceRouteInfo.getRouteDefinitionList(); - for (RouteDefinition routeDefinition : routeDefinitionList) { - T targetRoute = this.buildTargetRoute(serviceRouteInfo, routeDefinition); - routeRepository.add(targetRoute); - if (log.isDebugEnabled()) { - log.debug("新增路由:{}", JSON.toJSONString(routeDefinition)); - } - } - this.routeRepository.refresh(); - callback.accept(null); - } catch (Exception e) { - log.error("加载路由信息失败,serviceRouteInfo:{}", serviceRouteInfo, e); - } - } - - /** - * 构建路由id MD5 - * - * @param routeDefinitionList 路由列表 - * @return 返回MD5 - */ - private String buildMd5(List routeDefinitionList) { - List routeIdList = routeDefinitionList.stream() - .map(JSON::toJSONString) - .sorted() - .collect(Collectors.toList()); - String md5Source = org.apache.commons.lang3.StringUtils.join(routeIdList, ""); - return DigestUtils.md5DigestAsHex(md5Source.getBytes(StandardCharsets.UTF_8)); - } - - @Override - public void remove(String serviceId) { - serviceIdMd5Map.remove(serviceId); - routeRepository.deleteAll(serviceId); - } -} diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/route/BaseForwardChooser.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/route/BaseForwardChooser.java index 261742d2..258c759b 100644 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/route/BaseForwardChooser.java +++ b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/route/BaseForwardChooser.java @@ -24,7 +24,7 @@ public abstract class BaseForwardChooser implements ForwardChooser, ApiPar ApiParam apiParam = getApiParam(t); String nameVersion = apiParam.fetchNameVersion(); TargetRoute targetRoute = RouteRepositoryContext.getRouteRepository().get(nameVersion); - String serviceId = targetRoute.getServiceRouteInfo().fetchServiceIdLowerCase(); + String serviceId = targetRoute.getServiceDefinition().fetchServiceIdLowerCase(); // 如果服务在灰度阶段,返回一个灰度版本号 String grayVersion = envGrayManager.getVersion(serviceId, nameVersion); // 如果是灰度环境 diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/route/ServiceRouteListener.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/route/ServiceRouteListener.java index b466312e..68a1f07f 100644 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/route/ServiceRouteListener.java +++ b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/route/ServiceRouteListener.java @@ -3,7 +3,7 @@ package com.gitee.sop.gatewaycommon.route; import com.alibaba.fastjson.JSON; import com.gitee.sop.gatewaycommon.bean.InstanceDefinition; import com.gitee.sop.gatewaycommon.bean.ServiceRouteInfo; -import com.gitee.sop.gatewaycommon.manager.BaseRouteCache; +import com.gitee.sop.gatewaycommon.gateway.route.GatewayRouteCache; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang.StringUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -24,10 +24,8 @@ public class ServiceRouteListener extends BaseServiceListener { private static final String METADATA_SOP_ROUTES_PATH = "sop.routes.path"; - private static final String HEADER_RESTFUL = "restful"; - @Autowired - private BaseRouteCache baseRouteCache; + private GatewayRouteCache gatewayRouteCache; @Autowired private RoutesProcessor routesProcessor; @@ -35,7 +33,7 @@ public class ServiceRouteListener extends BaseServiceListener { @Override public void onRemoveService(String serviceId) { log.info("服务下线,删除路由配置,serviceId: {}", serviceId); - baseRouteCache.remove(serviceId); + gatewayRouteCache.remove(serviceId); routesProcessor.removeAllRoutes(serviceId); } @@ -48,7 +46,7 @@ public class ServiceRouteListener extends BaseServiceListener { if (responseEntity.getStatusCode() == HttpStatus.OK) { String body = responseEntity.getBody(); ServiceRouteInfo serviceRouteInfo = JSON.parseObject(body, ServiceRouteInfo.class); - baseRouteCache.load(serviceRouteInfo, callback -> routesProcessor.saveRoutes(serviceRouteInfo, instance)); + gatewayRouteCache.load(serviceRouteInfo, callback -> routesProcessor.saveRoutes(serviceRouteInfo, instance)); } else { log.error("拉取路由配置异常,url: {}, status: {}, body: {}", url, responseEntity.getStatusCodeValue(), responseEntity.getBody()); } 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 19093743..50ea7c08 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 @@ -129,7 +129,7 @@ public class ApiValidator implements Validator { } private void initFields(TargetRoute targetRoute, ApiParam apiParam) { - apiParam.setServiceId(targetRoute.getServiceRouteInfo().getServiceId()); + apiParam.setServiceId(targetRoute.getServiceDefinition().getServiceId()); boolean mergeResult; Boolean defaultSetting = ApiContext.getApiConfig().getMergeResult(); if (defaultSetting != null) { diff --git a/sop-gateway/src/main/java/com/gitee/sop/gateway/mapper/ConfigServiceRouteMapper.java b/sop-gateway/src/main/java/com/gitee/sop/gateway/mapper/ConfigServiceRouteMapper.java index 94a6137c..3fb317fa 100644 --- a/sop-gateway/src/main/java/com/gitee/sop/gateway/mapper/ConfigServiceRouteMapper.java +++ b/sop-gateway/src/main/java/com/gitee/sop/gateway/mapper/ConfigServiceRouteMapper.java @@ -7,5 +7,5 @@ import com.gitee.sop.gateway.entity.ConfigServiceRoute; /** * @author tanghc */ -public interface ConfigServiceRouteMapper extends CrudMapper { +public interface ConfigServiceRouteMapper extends CrudMapper { } From bdf33347321723d87bd32623271aa99a55d59f9c Mon Sep 17 00:00:00 2001 From: tanghc Date: Thu, 20 Aug 2020 14:23:36 +0800 Subject: [PATCH 10/15] 4.0.3 --- .../sop/gatewaycommon/gateway/route/GatewayRouteCache.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/route/GatewayRouteCache.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/route/GatewayRouteCache.java index abd7ecaa..068de786 100644 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/route/GatewayRouteCache.java +++ b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/route/GatewayRouteCache.java @@ -64,6 +64,10 @@ public class GatewayRouteCache implements RouteLoader { routeRepository.add(targetRoute); } + public void refresh() { + this.routeRepository.refresh(); + } + /** * 构建路由id MD5 * From 34519ee280f63c6e2d1457e2b7ed829e597623fa Mon Sep 17 00:00:00 2001 From: tanghc Date: Thu, 20 Aug 2020 14:28:51 +0800 Subject: [PATCH 11/15] 4.0.3 --- .../gateway/route/GatewayRouteCache.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/route/GatewayRouteCache.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/route/GatewayRouteCache.java index 068de786..02b4d491 100644 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/route/GatewayRouteCache.java +++ b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/route/GatewayRouteCache.java @@ -52,18 +52,28 @@ public class GatewayRouteCache implements RouteLoader { log.debug("新增路由:{}", JSON.toJSONString(routeDefinition)); } } - this.routeRepository.refresh(); + this.refresh(); callback.accept(null); } catch (Exception e) { log.error("加载路由信息失败,serviceRouteInfo:{}", serviceRouteInfo, e); } } + /** + * 添加路由信息到本地缓存,这里添加后Spring Cloud Gateway并不会识别路由,需要调用refresh()方法 + * + * @see #refresh() + * @param serviceId 服务id + * @param routeDefinition 路由信息 + */ public void add(String serviceId, RouteDefinition routeDefinition) { GatewayTargetRoute targetRoute = new GatewayTargetRoute(new ServiceDefinition(serviceId), routeDefinition); routeRepository.add(targetRoute); } + /** + * 刷新路由到Spring Cloud Gateway路由管理器当中 + */ public void refresh() { this.routeRepository.refresh(); } From 4fad0d67ef096b1154cb5db5b2643af5648b716b Mon Sep 17 00:00:00 2001 From: tanghc Date: Thu, 20 Aug 2020 16:09:35 +0800 Subject: [PATCH 12/15] 4.0.3 --- .../sop/adminserver/bean/RouteDefinition.java | 89 ------------------- .../adminserver/bean/ServiceRouteInfo.java | 26 ------ 2 files changed, 115 deletions(-) delete mode 100644 sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/bean/RouteDefinition.java delete mode 100644 sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/bean/ServiceRouteInfo.java diff --git a/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/bean/RouteDefinition.java b/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/bean/RouteDefinition.java deleted file mode 100644 index 73de492d..00000000 --- a/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/bean/RouteDefinition.java +++ /dev/null @@ -1,89 +0,0 @@ -package com.gitee.sop.adminserver.bean; - -import com.alibaba.fastjson.annotation.JSONField; -import com.gitee.easyopen.doc.annotation.ApiDocField; -import lombok.Data; - -import java.util.ArrayList; -import java.util.List; - -/** - * @author tanghc - */ -@Data -public class RouteDefinition { - /** - * 路由的Id - */ - @ApiDocField(description = "路由id") - private String id = ""; - - /** - * 接口名 - */ - private String name; - - /** - * 版本号 - */ - private String version; - - /** - * 路由断言集合配置 - */ - @JSONField(serialize = false) - private List predicates = new ArrayList<>(); - - /** - * 路由过滤器集合配置 - */ - @JSONField(serialize = false) - private List filters = new ArrayList<>(); - - /** - * 路由规则转发的目标uri - */ - @ApiDocField(description = "uri") - private String uri; - - /** - * uri后面跟的path - */ - @ApiDocField(description = "path") - private String path; - - /** - * 路由执行的顺序 - */ - private int order = 0; - - /** - * 是否忽略验证,业务参数验证除外 - */ - @ApiDocField(description = "是否忽略验证,业务参数验证除外,1:忽略,0:不忽略") - private int ignoreValidate; - - /** - * 状态,0:待审核,1:启用,2:禁用 - */ - @ApiDocField(description = "状态,0:待审核,1:启用,2:禁用") - private int status = 1; - - /** - * 合并结果,统一格式输出 - */ - @ApiDocField(description = "合并结果,统一格式输出,1:合并,0:不合并") - private int mergeResult = 1; - - /** - * 是否需要授权才能访问 - */ - @ApiDocField(description = "是否需要授权才能访问,1:是,0:否") - private int permission; - - /** - * 是否是自定义路由 - */ - @ApiDocField(description = "是否是自定义路由,1:是,0:否") - private int custom; -} \ No newline at end of file diff --git a/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/bean/ServiceRouteInfo.java b/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/bean/ServiceRouteInfo.java deleted file mode 100644 index db2bac6c..00000000 --- a/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/bean/ServiceRouteInfo.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.gitee.sop.adminserver.bean; - -import lombok.Data; - -import java.util.Date; -import java.util.List; - -/** - * @author tanghc - */ -@Data -public class ServiceRouteInfo { - /** 服务名称,对应spring.application.name */ - private String serviceId; - - private Date createTime = new Date(); - - private Date updateTime = new Date(); - - private String description; - - private List routeDefinitionList; - - /** 是否是自定义服务,1:是,0:否 */ - private int custom; -} \ No newline at end of file From ebae72d88336c6dd0fa6a55e12aab2efb2490609 Mon Sep 17 00:00:00 2001 From: tanghc Date: Mon, 24 Aug 2020 11:20:24 +0800 Subject: [PATCH 13/15] 4.0.3 --- sop-mysql5.6以下版本.sql | 22 +++++++++++----------- sop.sql | 22 +++++++++++----------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/sop-mysql5.6以下版本.sql b/sop-mysql5.6以下版本.sql index 54f00aa6..9ac25404 100644 --- a/sop-mysql5.6以下版本.sql +++ b/sop-mysql5.6以下版本.sql @@ -314,17 +314,17 @@ UNLOCK TABLES; LOCK TABLES `isv_info` WRITE; ALTER TABLE `isv_info` DISABLE KEYS; -INSERT INTO `isv_info` (`id`, `app_key`, `secret`, `pub_key`, `pri_key`, `status`, `sign_type`, `remark`, `gmt_create`, `gmt_modified`) VALUES - (1,'2019032617262200001','','MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlyb9aUBaljQP/vjmBFe1mF8HsWSvyfC2NTlpT/V9E+sBxTr8TSkbzJCeeeOEm4LCaVXL0Qz63MZoT24v7AIXTuMdj4jyiM/WJ4tjrWAgnmohNOegfntTto16C3l234vXz4ryWZMR/7W+MXy5B92wPGQEJ0LKFwNEoLspDEWZ7RdE53VH7w6y6sIZUfK+YkXWSwehfKPKlx+lDw3zRJ3/yvMF+U+BAdW/MfECe1GuBnCFKnlMRh3UKczWyXWkL6ItOpY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RI1L9uyvqEIBa7XtEaduAFor5lokPc1WpdVcTwTfRxgeJAgMBAAECgYAM3XFGL1k0aQiChiUCaEvJKTgAywLgHm/5dRC5JwKP8knqnn+I9P5QcV0jimPvaFjZ4VCdAvCjOC3EUNSvRn7wR2Lb1+BGZZePTdxtHWE2aqJ1W1SvgQTqMsLlPBRPnXo5XH/ng3WEH15ynd5NR035xAluaI0X/y+PsRxE6TlfIQJBAPSYUyXa2yaEqmvIN+ECKALCLLeDdi2YW3Kjahgz0X9V4Y4aTdrHh8y603zXC0Wy8HeOhwGoyciaS8SmjxCMn4UCQQDXweW8xsUreLH8hfVUtyiY/KgUz+R5foJDNXD7TLE9CDoPSHy09qBe99HyVCZg/gNJH4O+tNr6C4916dYaVk01AkBYZ2HOEc8ZmeOaty/zJHtfm9zbqykgi6upwISNINV8Z4bxfHJdO7bKeVANFBBf7a/aFmqXX/EmjxYJioW03o6dAkEAp7ViXJCtJpNU1pNSFZ2hgvmxtSu7zuyVWKSrw8rjYiuI5eRUe13RXsCHgzQB+Ra5exdyEsUGCaL+yosPD73RmQJBALGuM8EQUcBgrpgpeLZ39Ni1DYXYG9aj+u+ar/UL6kI1mCNFgwroO4EVIvXPVxikMxUgiE2tVaBML5nm8VDNJ7s=',2,1,NULL,'2019-03-27 11:01:11','2019-05-11 10:45:01'), - (5,'20190331562013861008375808','29864b93427447f5ac6c44df746f84ef','MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC4aMIx2q8rCVu5z6dgNQQSX2vwhvIcRb7FaqSk0ZK8AV9qQeE1TvfFVlAzOHlysE1yTRb0Mb6W2aw7IAS7Bkc3onYBQR4zNQYjYoDBzLukjF8o84hoVFRnh7sV8zszid2vb5H/YQr3M+5sYhlXY8KfILk3vhdbWpHM/umplcrxlwIDAQAB','MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBALhowjHarysJW7nPp2A1BBJfa/CG8hxFvsVqpKTRkrwBX2pB4TVO98VWUDM4eXKwTXJNFvQxvpbZrDsgBLsGRzeidgFBHjM1BiNigMHMu6SMXyjziGhUVGeHuxXzOzOJ3a9vkf9hCvcz7mxiGVdjwp8guTe+F1takcz+6amVyvGXAgMBAAECgYBj40LFVGoryp7n0CYeg7kX5p4GJGKCk/jY4IIcUPTFZ4zydorxoDuvpag9hmqqh/r7XeyAC23sMi4LvLUzRRxPh+7PuwL6nLce7vytsMCZQTPpBgz7dUfbi2HAxsuMOLjH3sVGycutARJsz6bT+9PyBEuVtUqwBrDGpFvwT0z6yQJBAOANC8nysb+O4rn/fbJtHIhtQoV74yu00mLnfwv8/J1+WyAEc32WZ4KYINqCe8ft1UknhPQx9UV6JaPCnlpF6w0CQQDStJhd38uQ7dVUQZHGP24xS/K38AYiSheEr7uewhkJfC2cKqE/lBk3oEG4s7asjhwlFLWLWSBLVM/Ta9Yj0hYzAkBe82hxl1bY9bcEWFBu02rqLlOouk4V8bXPkIf5DqgIHsqDkR9Ys+r+H3ac4/uNSS/ApuzjiGCHpzJYalwtqb/pAkEAvAKlSm5dCC8QAaSYXJtQyfAI3hPwhTwzjBP6iAiNqqcBU62+QCr37Wiz/Alv4LzVZEj8TSDz7gP5hZ9dbo0RfQJBALJ7NhTaeMN4jxBJ6Xg4rNZPb4yhAXuFxCp+a+FyXTsbWnW/ar8KJ3LHox0GOao6wne4qN3h7eqLOrYnnvOSFl0=',1,2,NULL,'2019-03-31 20:34:12','2019-04-19 17:30:09'), - (6,'20190331562037310372184064','d6b2a6603236491f87eed958292be136','','',2,2,NULL,'2019-03-31 22:07:20','2019-05-07 18:14:53'), - (7,'20190401562373672858288128','','MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCOgSo6GfwM8a+rUT4m61nZa7q5cJpjL7luxQKuJvkMl/QydVrzRPinCh6zqgBJDa7YY2X6z5TyTkjYuDkYMrdyHcYvCDuJ0NpRPZMR+QDE70yp9wJ+kOqTa8bepJtxzuCYLxFz+wRsIFt0nIxC6ttCaM9OEw/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Ni/mjRlgD74j8z0eOsgvOq9mwbCrgLhLo51H9O/wAxtb+hBKtC5l50pBr4gER6d8W6EQNTSGojnMIaLXTkAZ5Qf6Z8e2HFVdOn0X0CgYEA7SSrTokwzukt5KldNu5ukyyd+C3D1i6orbg6qD73EP9CfNMfGSBn7dDv9wMSJH01+Ty+RgTROgtjGRDbMJWnfbdt/61NePr9ar5sb6Nbsf7/I0w7cZF5dsaFYgzaOfQYquzXPbLQHkpMT64bqpv/Mwy4F2lFvaYWY5fA4pC2uckCgYEAg75Ym9ybJaoTqky8ttQ2Jy8UZ4VSVQhVC0My02sCWwWXLlXi8y7An+Rec73Ve0yxREOn5WrQT6pkmzh7V/ABWrYi5WxODpCIjtSbo0fLBa3Wqle00b0/hdCITetqIa/cFs1zUrOqICgK3bKWeXqiAkhhcwSZwwSgwOKM04Wn7ZUCgYBvhHX2mbdVJfyJ8kc+hMOE/E9RHRxiBVEXWHJlGi8PVCqNDq8qHr4g7Mdbzprig+s0yKblwHAvrpkseWvKHiZEjVTyDipHgShY4TGXEigVvUd37uppTrLi8xpYcJjS9gH/px7VCdiq1d+q/MJP6coJ1KphgATm2UrgDMYNBWaYWQKBgEHRxrmER7btUF60/YgcqPHFc8RpYQB2ZZE0kyKGDqk2Data1XYUY6vsPAU28yRLAaWr/D2H17iyLkxP80VLm6QhifxCadv90Q/Wl1DFfOJQMW6avyQ0so6G0wFq/LJxaFK4iLXQn1RJnmTp6BYiJMmK2BhFbRzw8ssMoF6ad2rr',1,1,NULL,'2019-04-03 19:54:05','2019-04-03 20:11:58'), - (10,'easyopen_test','G9w0BAQEFAAOCAQ8AMIIBCgKCA','','',1,2,NULL,'2019-04-19 17:19:34','2019-04-19 17:30:09'), - (11,'20190513577548661718777856','','MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCdGjz3IE2VQteDjQaFacXLCAIqdEIIVcf7LW7f142V55Q0xtcjDTOHjBHExZsG64/Y5WKz4oQVWGnXwtrled8Qg0YAA7ueat8mE8NzJSm9txbfU9hwXB77nJxVkFyaSG1p0IZFrNQpbbUxTX9755deP7DdcSF148LLr091V++S3QIDAQAB','MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAJ0aPPcgTZVC14ONBoVpxcsIAip0QghVx/stbt/XjZXnlDTG1yMNM4eMEcTFmwbrj9jlYrPihBVYadfC2uV53xCDRgADu55q3yYTw3MlKb23Ft9T2HBcHvucnFWQXJpIbWnQhkWs1ClttTFNf3vnl14/sN1xIXXjwsuvT3VX75LdAgMBAAECgYB68z/nQDa3q/oykDocS21qujfHtfi/wTKjVylAsdezC+wnab6RRhGf8XUuhGARiGWpn8whcBNjCTC8lVju4vQ5IIx4Hb74vwDDMtNXeqwkLmARLYu2ELibauezSeqom8/J8cR3ho7Hr4VHPTiC8qvePRmu8AvXVQz2T7SOhEjDGQJBAOm8XOivr+atiknLbQhmo508ON3sjoN9VMwK9cmnup+ZPCsurJTHRja0MJQNdOXObUVJ6wJhs1PHWT+vITfXGJ8CQQCsESzxOYTkZaqBUFjbWVf1rSwjOOsylweTuq44YIJkHhwMjHf3kN/UTXbxsBPUGeT7/+2K5UwQ9snUPr0yTBcDAkA0FMezBWqxgNu+g7iA1bYBVCjrskkzHVsmuA56Z4hbBZ71lEnaQOjxSYdFhhYVGsEYXlciSbjWoyXM3e4N7jzLAkB0ejv+H33CTsAZQZalBdnxSQTz4vf0CyDp9BkzuMELnQZHyF79i2i5gqbd/N+vWMgVfq4CtC3F3gnKT54rii6ZAkAMBIvHriT5Zbs1fW+oxBP1rHqdsRvqs1zEyIadvJgKAFwFEisryfdw2mWm3vxQQ22RlOquBiZEDIlyM0z2m9PJ',1,1,NULL,'2019-05-13 17:24:17','2019-05-13 17:24:17'), - (12,'20190513577548661718777857','','MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCdGjz3IE2VQteDjQaFacXLCAIqdEIIVcf7LW7f142V55Q0xtcjDTOHjBHExZsG64/Y5WKz4oQVWGnXwtrled8Qg0YAA7ueat8mE8NzJSm9txbfU9hwXB77nJxVkFyaSG1p0IZFrNQpbbUxTX9755deP7DdcSF148LLr091V++S3QIDAQAB','MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAJ0aPPcgTZVC14ONBoVpxcsIAip0QghVx/stbt/XjZXnlDTG1yMNM4eMEcTFmwbrj9jlYrPihBVYadfC2uV53xCDRgADu55q3yYTw3MlKb23Ft9T2HBcHvucnFWQXJpIbWnQhkWs1ClttTFNf3vnl14/sN1xIXXjwsuvT3VX75LdAgMBAAECgYB68z/nQDa3q/oykDocS21qujfHtfi/wTKjVylAsdezC+wnab6RRhGf8XUuhGARiGWpn8whcBNjCTC8lVju4vQ5IIx4Hb74vwDDMtNXeqwkLmARLYu2ELibauezSeqom8/J8cR3ho7Hr4VHPTiC8qvePRmu8AvXVQz2T7SOhEjDGQJBAOm8XOivr+atiknLbQhmo508ON3sjoN9VMwK9cmnup+ZPCsurJTHRja0MJQNdOXObUVJ6wJhs1PHWT+vITfXGJ8CQQCsESzxOYTkZaqBUFjbWVf1rSwjOOsylweTuq44YIJkHhwMjHf3kN/UTXbxsBPUGeT7/+2K5UwQ9snUPr0yTBcDAkA0FMezBWqxgNu+g7iA1bYBVCjrskkzHVsmuA56Z4hbBZ71lEnaQOjxSYdFhhYVGsEYXlciSbjWoyXM3e4N7jzLAkB0ejv+H33CTsAZQZalBdnxSQTz4vf0CyDp9BkzuMELnQZHyF79i2i5gqbd/N+vWMgVfq4CtC3F3gnKT54rii6ZAkAMBIvHriT5Zbs1fW+oxBP1rHqdsRvqs1zEyIadvJgKAFwFEisryfdw2mWm3vxQQ22RlOquBiZEDIlyM0z2m9PJ',1,1,NULL,'2019-05-13 17:24:17','2019-05-13 17:24:17'); +INSERT INTO `isv_info` (`id`, `app_key`, `status`, `sign_type`, `remark`, `gmt_create`, `gmt_modified`) VALUES + (1,'2019032617262200001',1,1,NULL,'2019-03-27 10:10:34','2019-05-09 11:10:38'), + (3,'asdfasdf',2,1,NULL,'2019-03-27 11:01:11','2019-05-11 10:45:01'), + (5,'20190331562013861008375808',1,2,NULL,'2019-03-31 20:34:12','2019-04-19 17:30:09'), + (6,'20190331562037310372184064',2,2,NULL,'2019-03-31 22:07:20','2019-05-07 18:14:53'), + (7,'20190401562373672858288128',1,1,NULL,'2019-04-01 20:24:01','2019-04-01 20:27:33'), + (8,'20190401562373796095328256',1,1,NULL,'2019-04-01 20:24:25','2019-04-01 20:24:48'), + (9,'201904035630907729292csharp',1,1,NULL,'2019-04-03 19:54:05','2019-04-03 20:11:58'), + (10,'easyopen_test',1,2,NULL,'2019-04-19 17:19:34','2019-04-19 17:30:09'), + (11,'20190513577548661718777856',1,1,NULL,'2019-05-13 17:24:17','2019-05-13 17:24:17'), + (12,'20190513577548661718777857',1,1,NULL,'2019-05-13 17:24:17','2019-05-13 17:24:17'); ALTER TABLE `isv_info` ENABLE KEYS; UNLOCK TABLES; diff --git a/sop.sql b/sop.sql index c9af1cee..8d84c47f 100644 --- a/sop.sql +++ b/sop.sql @@ -316,17 +316,17 @@ UNLOCK TABLES; LOCK TABLES `isv_info` WRITE; ALTER TABLE `isv_info` DISABLE KEYS; -INSERT INTO `isv_info` (`id`, `app_key`, `secret`, `pub_key`, `pri_key`, `status`, `sign_type`, `remark`, `gmt_create`, `gmt_modified`) VALUES - (1,'2019032617262200001','','MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlyb9aUBaljQP/vjmBFe1mF8HsWSvyfC2NTlpT/V9E+sBxTr8TSkbzJCeeeOEm4LCaVXL0Qz63MZoT24v7AIXTuMdj4jyiM/WJ4tjrWAgnmohNOegfntTto16C3l234vXz4ryWZMR/7W+MXy5B92wPGQEJ0LKFwNEoLspDEWZ7RdE53VH7w6y6sIZUfK+YkXWSwehfKPKlx+lDw3zRJ3/yvMF+U+BAdW/MfECe1GuBnCFKnlMRh3UKczWyXWkL6ItOpYHHJi/jx85op5BWDje2pY9Qowz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LsGRzeidgFBHjM1BiNigMHMu6SMXyjziGhUVGeHuxXzOzOJ3a9vkf9hCvcz7mxiGVdjwp8guTe+F1takcz+6amVyvGXAgMBAAECgYBj40LFVGoryp7n0CYeg7kX5p4GJGKCk/jY4IIcUPTFZ4zydorxoDuvpag9hmqqh/r7XeyAC23sMi4LvLUzRRxPh+7PuwL6nLce7vytsMCZQTPpBgz7dUfbi2HAxsuMOLjH3sVGycutARJsz6bT+9PyBEuVtUqwBrDGpFvwT0z6yQJBAOANC8nysb+O4rn/fbJtHIhtQoV74yu00mLnfwv8/J1+WyAEc32WZ4KYINqCe8ft1UknhPQx9UV6JaPCnlpF6w0CQQDStJhd38uQ7dVUQZHGP24xS/K38AYiSheEr7uewhkJfC2cKqE/lBk3oEG4s7asjhwlFLWLWSBLVM/Ta9Yj0hYzAkBe82hxl1bY9bcEWFBu02rqLlOouk4V8bXPkIf5DqgIHsqDkR9Ys+r+H3ac4/uNSS/ApuzjiGCHpzJYalwtqb/pAkEAvAKlSm5dCC8QAaSYXJtQyfAI3hPwhTwzjBP6iAiNqqcBU62+QCr37Wiz/Alv4LzVZEj8TSDz7gP5hZ9dbo0RfQJBALJ7NhTaeMN4jxBJ6Xg4rNZPb4yhAXuFxCp+a+FyXTsbWnW/ar8KJ3LHox0GOao6wne4qN3h7eqLOrYnnvOSFl0=',1,2,NULL,'2019-03-31 20:34:12','2019-04-19 17:30:09'), - (6,'20190331562037310372184064','d6b2a6603236491f87eed958292be136','','',2,2,NULL,'2019-03-31 22:07:20','2019-05-07 18:14:53'), - (7,'20190401562373672858288128','','MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCOgSo6GfwM8a+rUT4m61nZa7q5cJpjL7luxQKuJvkMl/QydVrzRPinCh6zqgBJDa7YY2X6z5TyTkjYuDkYMrdyHcYvCDuJ0NpRPZMR+QDE70yp9wJ+kOqTa8bepJtxzuCYLxFz+wRsIFt0nIxC6ttCaM9OEw/Bflhws3xczw4uqQIDAQAB','M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9mwbCrgLhLo51H9O/wAxtb+hBKtC5l50pBr4gER6d8W6EQNTSGojnMIaLXTkAZ5Qf6Z8e2HFVdOn0X0CgYEA7SSrTokwzukt5KldNu5ukyyd+C3D1i6orbg6qD73EP9CfNMfGSBn7dDv9wMSJH01+Ty+RgTROgtjGRDbMJWnfbdt/61NePr9ar5sb6Nbsf7/I0w7cZF5dsaFYgzaOfQYquzXPbLQHkpMT64bqpv/Mwy4F2lFvaYWY5fA4pC2uckCgYEAg75Ym9ybJaoTqky8ttQ2Jy8UZ4VSVQhVC0My02sCWwWXLlXi8y7An+Rec73Ve0yxREOn5WrQT6pkmzh7V/ABWrYi5WxODpCIjtSbo0fLBa3Wqle00b0/hdCITetqIa/cFs1zUrOqICgK3bKWeXqiAkhhcwSZwwSgwOKM04Wn7ZUCgYBvhHX2mbdVJfyJ8kc+hMOE/E9RHRxiBVEXWHJlGi8PVCqNDq8qHr4g7Mdbzprig+s0yKblwHAvrpkseWvKHiZEjVTyDipHgShY4TGXEigVvUd37uppTrLi8xpYcJjS9gH/px7VCdiq1d+q/MJP6coJ1KphgATm2UrgDMYNBWaYWQKBgEHRxrmER7btUF60/YgcqPHFc8RpYQB2ZZE0kyKGDqk2Data1XYUY6vsPAU28yRLAaWr/D2H17iyLkxP80VLm6QhifxCadv90Q/Wl1DFfOJQMW6avyQ0so6G0wFq/LJxaFK4iLXQn1RJnmTp6BYiJMmK2BhFbRzw8ssMoF6ad2rr',1,1,NULL,'2019-04-03 19:54:05','2019-04-03 20:11:58'), - (10,'easyopen_test','G9w0BAQEFAAOCAQ8AMIIBCgKCA','','',1,2,NULL,'2019-04-19 17:19:34','2019-04-19 17:30:09'), - (11,'20190513577548661718777856','','MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCdGjz3IE2VQteDjQaFacXLCAIqdEIIVcf7LW7f142V55Q0xtcjDTOHjBHExZsG64/Y5WKz4oQVWGnXwtrled8Qg0YAA7ueat8mE8NzJSm9txbfU9hwXB77nJxVkFyaSG1p0IZFrNQpbbUxTX9755deP7DdcSF148LLr091V++S3QIDAQAB','MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAJ0aPPcgTZVC14ONBoVpxcsIAip0QghVx/stbt/XjZXnlDTG1yMNM4eMEcTFmwbrj9jlYrPihBVYadfC2uV53xCDRgADu55q3yYTw3MlKb23Ft9T2HBcHvucnFWQXJpIbWnQhkWs1ClttTFNf3vnl14/sN1xIXXjwsuvT3VX75LdAgMBAAECgYB68z/nQDa3q/oykDocS21qujfHtfi/wTKjVylAsdezC+wnab6RRhGf8XUuhGARiGWpn8whcBNjCTC8lVju4vQ5IIx4Hb74vwDDMtNXeqwkLmARLYu2ELibauezSeqom8/J8cR3ho7Hr4VHPTiC8qvePRmu8AvXVQz2T7SOhEjDGQJBAOm8XOivr+atiknLbQhmo508ON3sjoN9VMwK9cmnup+ZPCsurJTHRja0MJQNdOXObUVJ6wJhs1PHWT+vITfXGJ8CQQCsESzxOYTkZaqBUFjbWVf1rSwjOOsylweTuq44YIJkHhwMjHf3kN/UTXbxsBPUGeT7/+2K5UwQ9snUPr0yTBcDAkA0FMezBWqxgNu+g7iA1bYBVCjrskkzHVsmuA56Z4hbBZ71lEnaQOjxSYdFhhYVGsEYXlciSbjWoyXM3e4N7jzLAkB0ejv+H33CTsAZQZalBdnxSQTz4vf0CyDp9BkzuMELnQZHyF79i2i5gqbd/N+vWMgVfq4CtC3F3gnKT54rii6ZAkAMBIvHriT5Zbs1fW+oxBP1rHqdsRvqs1zEyIadvJgKAFwFEisryfdw2mWm3vxQQ22RlOquBiZEDIlyM0z2m9PJ',1,1,NULL,'2019-05-13 17:24:17','2019-05-13 17:24:17'), - (12,'20190513577548661718777857','','MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCdGjz3IE2VQteDjQaFacXLCAIqdEIIVcf7LW7f142V55Q0xtcjDTOHjBHExZsG64/Y5WKz4oQVWGnXwtrled8Qg0YAA7ueat8mE8NzJSm9txbfU9hwXB77nJxVkFyaSG1p0IZFrNQpbbUxTX9755deP7DdcSF148LLr091V++S3QIDAQAB','MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAJ0aPPcgTZVC14ONBoVpxcsIAip0QghVx/stbt/XjZXnlDTG1yMNM4eMEcTFmwbrj9jlYrPihBVYadfC2uV53xCDRgADu55q3yYTw3MlKb23Ft9T2HBcHvucnFWQXJpIbWnQhkWs1ClttTFNf3vnl14/sN1xIXXjwsuvT3VX75LdAgMBAAECgYB68z/nQDa3q/oykDocS21qujfHtfi/wTKjVylAsdezC+wnab6RRhGf8XUuhGARiGWpn8whcBNjCTC8lVju4vQ5IIx4Hb74vwDDMtNXeqwkLmARLYu2ELibauezSeqom8/J8cR3ho7Hr4VHPTiC8qvePRmu8AvXVQz2T7SOhEjDGQJBAOm8XOivr+atiknLbQhmo508ON3sjoN9VMwK9cmnup+ZPCsurJTHRja0MJQNdOXObUVJ6wJhs1PHWT+vITfXGJ8CQQCsESzxOYTkZaqBUFjbWVf1rSwjOOsylweTuq44YIJkHhwMjHf3kN/UTXbxsBPUGeT7/+2K5UwQ9snUPr0yTBcDAkA0FMezBWqxgNu+g7iA1bYBVCjrskkzHVsmuA56Z4hbBZ71lEnaQOjxSYdFhhYVGsEYXlciSbjWoyXM3e4N7jzLAkB0ejv+H33CTsAZQZalBdnxSQTz4vf0CyDp9BkzuMELnQZHyF79i2i5gqbd/N+vWMgVfq4CtC3F3gnKT54rii6ZAkAMBIvHriT5Zbs1fW+oxBP1rHqdsRvqs1zEyIadvJgKAFwFEisryfdw2mWm3vxQQ22RlOquBiZEDIlyM0z2m9PJ',1,1,NULL,'2019-05-13 17:24:17','2019-05-13 17:24:17'); +INSERT INTO `isv_info` (`id`, `app_key`, `status`, `sign_type`, `remark`, `gmt_create`, `gmt_modified`) VALUES + (1,'2019032617262200001',1,1,NULL,'2019-03-27 10:10:34','2019-05-09 11:10:38'), + (3,'asdfasdf',2,1,NULL,'2019-03-27 11:01:11','2019-05-11 10:45:01'), + (5,'20190331562013861008375808',1,2,NULL,'2019-03-31 20:34:12','2019-04-19 17:30:09'), + (6,'20190331562037310372184064',2,2,NULL,'2019-03-31 22:07:20','2019-05-07 18:14:53'), + (7,'20190401562373672858288128',1,1,NULL,'2019-04-01 20:24:01','2019-04-01 20:27:33'), + (8,'20190401562373796095328256',1,1,NULL,'2019-04-01 20:24:25','2019-04-01 20:24:48'), + (9,'201904035630907729292csharp',1,1,NULL,'2019-04-03 19:54:05','2019-04-03 20:11:58'), + (10,'easyopen_test',1,2,NULL,'2019-04-19 17:19:34','2019-04-19 17:30:09'), + (11,'20190513577548661718777856',1,1,NULL,'2019-05-13 17:24:17','2019-05-13 17:24:17'), + (12,'20190513577548661718777857',1,1,NULL,'2019-05-13 17:24:17','2019-05-13 17:24:17'); ALTER TABLE `isv_info` ENABLE KEYS; UNLOCK TABLES; From 8e8f24f5e8018a3f88c4df6f9cff584755e72bd5 Mon Sep 17 00:00:00 2001 From: tanghc Date: Mon, 24 Aug 2020 11:51:14 +0800 Subject: [PATCH 14/15] 4.0.3 --- .../adminserver/entity/ConfigRouteLimit.java | 58 -------- .../mapper/ConfigRouteLimitMapper.java | 12 -- .../src/main/resources/public/index.html | 2 +- ...0cde16.css => chunk-4bdcb5ea.b23e7407.css} | 2 +- .../js/{app.8d6768e7.js => app.2e027154.js} | 2 +- .../static/js/chunk-42f006d4.a9dde27f.js | 1 - .../static/js/chunk-4bdcb5ea.cf292569.js | 1 + .../sop-admin-vue/src/views/service/limit.vue | 6 +- sop-mysql5.6以下版本.sql | 82 +--------- sop.sql | 140 +++++------------- 10 files changed, 43 insertions(+), 263 deletions(-) delete mode 100644 sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/entity/ConfigRouteLimit.java delete mode 100644 sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/mapper/ConfigRouteLimitMapper.java rename sop-admin/sop-admin-server/src/main/resources/public/static/css/{chunk-42f006d4.670cde16.css => chunk-4bdcb5ea.b23e7407.css} (85%) rename sop-admin/sop-admin-server/src/main/resources/public/static/js/{app.8d6768e7.js => app.2e027154.js} (99%) delete mode 100644 sop-admin/sop-admin-server/src/main/resources/public/static/js/chunk-42f006d4.a9dde27f.js create mode 100644 sop-admin/sop-admin-server/src/main/resources/public/static/js/chunk-4bdcb5ea.cf292569.js diff --git a/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/entity/ConfigRouteLimit.java b/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/entity/ConfigRouteLimit.java deleted file mode 100644 index 6b927d1c..00000000 --- a/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/entity/ConfigRouteLimit.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.gitee.sop.adminserver.entity; - -import lombok.Data; - -import java.util.Date; - -import javax.persistence.Column; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Table; - - -/** - * 表名:config_route_limit - * 备注:路由限流配置 - * - * @author tanghc - */ -@Table(name = "config_route_limit") -@Data -public class ConfigRouteLimit { - @Id - @Column(name = "id") - @GeneratedValue(strategy = GenerationType.IDENTITY) - /** 数据库字段:id */ - private Integer id; - - /** 路由id, 数据库字段:route_id */ - private String routeId; - - /** serviceId, 数据库字段:service_id */ - private String serviceId; - - /** 限流策略,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; - - /** 数据库字段:gmt_create */ - private Date gmtCreate; - - /** 数据库字段:gmt_modified */ - private Date gmtModified; -} diff --git a/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/mapper/ConfigRouteLimitMapper.java b/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/mapper/ConfigRouteLimitMapper.java deleted file mode 100644 index 38438296..00000000 --- a/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/mapper/ConfigRouteLimitMapper.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.gitee.sop.adminserver.mapper; - -import com.gitee.fastmybatis.core.mapper.CrudMapper; - -import com.gitee.sop.adminserver.entity.ConfigRouteLimit; - - -/** - * @author tanghc - */ -public interface ConfigRouteLimitMapper extends CrudMapper { -} diff --git a/sop-admin/sop-admin-server/src/main/resources/public/index.html b/sop-admin/sop-admin-server/src/main/resources/public/index.html index b5b67574..56027016 100644 --- a/sop-admin/sop-admin-server/src/main/resources/public/index.html +++ b/sop-admin/sop-admin-server/src/main/resources/public/index.html @@ -1 +1 @@ -SOP Admin
\ No newline at end of file +SOP Admin
\ No newline at end of file diff --git a/sop-admin/sop-admin-server/src/main/resources/public/static/css/chunk-42f006d4.670cde16.css b/sop-admin/sop-admin-server/src/main/resources/public/static/css/chunk-4bdcb5ea.b23e7407.css similarity index 85% rename from sop-admin/sop-admin-server/src/main/resources/public/static/css/chunk-42f006d4.670cde16.css rename to sop-admin/sop-admin-server/src/main/resources/public/static/css/chunk-4bdcb5ea.b23e7407.css index a4777256..354bd0b0 100644 --- a/sop-admin/sop-admin-server/src/main/resources/public/static/css/chunk-42f006d4.670cde16.css +++ b/sop-admin/sop-admin-server/src/main/resources/public/static/css/chunk-4bdcb5ea.b23e7407.css @@ -1 +1 @@ -.custom-tree-node{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;font-size:14px;padding-right:8px}.el-input.is-disabled .el-input__inner,.el-radio__input.is-disabled+span.el-radio__label{color:#909399}.limit-tip[data-v-3fb78f74]{cursor:pointer;margin-left:10px} \ No newline at end of file +.custom-tree-node{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;font-size:14px;padding-right:8px}.el-input.is-disabled .el-input__inner,.el-radio__input.is-disabled+span.el-radio__label{color:#909399}.limit-tip[data-v-08125a7c]{cursor:pointer;margin-left:10px} \ No newline at end of file diff --git a/sop-admin/sop-admin-server/src/main/resources/public/static/js/app.8d6768e7.js b/sop-admin/sop-admin-server/src/main/resources/public/static/js/app.2e027154.js similarity index 99% rename from sop-admin/sop-admin-server/src/main/resources/public/static/js/app.8d6768e7.js rename to sop-admin/sop-admin-server/src/main/resources/public/static/js/app.2e027154.js index b6a2b94c..6555074b 100644 --- a/sop-admin/sop-admin-server/src/main/resources/public/static/js/app.8d6768e7.js +++ b/sop-admin/sop-admin-server/src/main/resources/public/static/js/app.2e027154.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["app"],{0:function(e,t,n){e.exports=n("56d7")},"0a7b":function(e,t,n){},"0cb8":function(e,t,n){},"186a":function(e,t,n){"use strict";var a=n("dc52"),i=n.n(a);i.a},"18f0":function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),r=n.n(o),c=new i.a({id:"icon-link",use:"icon-link-usage",viewBox:"0 0 128 128",content:''});r.a.add(c);t["default"]=c},2536:function(e,t,n){},"2a3d":function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),r=n.n(o),c=new i.a({id:"icon-password",use:"icon-password-usage",viewBox:"0 0 128 128",content:''});r.a.add(c);t["default"]=c},"30c3":function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),r=n.n(o),c=new i.a({id:"icon-example",use:"icon-example-usage",viewBox:"0 0 128 128",content:''});r.a.add(c);t["default"]=c},"34c8":function(e,t,n){"use strict";var a=n("88a1"),i=n.n(a);i.a},"405a":function(e,t,n){"use strict";var a=n("4a83"),i=n.n(a);i.a},"47f1":function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),r=n.n(o),c=new i.a({id:"icon-table",use:"icon-table-usage",viewBox:"0 0 128 128",content:''});r.a.add(c);t["default"]=c},"4a83":function(e,t,n){},"4df5":function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),r=n.n(o),c=new i.a({id:"icon-eye",use:"icon-eye-usage",viewBox:"0 0 128 64",content:''});r.a.add(c);t["default"]=c},"50be":function(e,t,n){"use strict";var a=n("2536"),i=n.n(a);i.a},"51ff":function(e,t,n){var a={"./dashboard.svg":"f782","./example.svg":"30c3","./eye-open.svg":"d7ec","./eye.svg":"4df5","./form.svg":"eb1b","./link.svg":"18f0","./nested.svg":"dcf8","./password.svg":"2a3d","./table.svg":"47f1","./tree.svg":"93cd","./user.svg":"b3b5"};function i(e){var t=o(e);return n(t)}function o(e){var t=a[e];if(!(t+1)){var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}return t}i.keys=function(){return Object.keys(a)},i.resolve=o,e.exports=i,i.id="51ff"},"56d7":function(e,t,n){"use strict";n.r(t);n("cadf"),n("551c"),n("f751"),n("097d");var a=n("2b0e"),i=(n("f5df"),n("5c96")),o=n.n(i),r=(n("0fae"),n("f0d9")),c=n.n(r),s=(n("b20f"),function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:"app"}},[n("router-view")],1)}),u=[],l={name:"App"},d=l,m=n("2877"),h=Object(m["a"])(d,s,u,!1,null,null,null),f=h.exports,p=n("2f62"),v=(n("7f7f"),{sidebar:function(e){return e.app.sidebar},device:function(e){return e.app.device},token:function(e){return e.user.token},avatar:function(e){return e.user.avatar},name:function(e){return e.user.name}}),b=v,g=n("a78e"),w=n.n(g),x={sidebar:{opened:!w.a.get("sidebarStatus")||!!+w.a.get("sidebarStatus"),withoutAnimation:!1},device:"desktop"},y={TOGGLE_SIDEBAR:function(e){e.sidebar.opened=!e.sidebar.opened,e.sidebar.withoutAnimation=!1,e.sidebar.opened?w.a.set("sidebarStatus",1):w.a.set("sidebarStatus",0)},CLOSE_SIDEBAR:function(e,t){w.a.set("sidebarStatus",0),e.sidebar.opened=!1,e.sidebar.withoutAnimation=t},TOGGLE_DEVICE:function(e,t){e.device=t}},k={toggleSideBar:function(e){var t=e.commit;t("TOGGLE_SIDEBAR")},closeSideBar:function(e,t){var n=e.commit,a=t.withoutAnimation;n("CLOSE_SIDEBAR",a)},toggleDevice:function(e,t){var n=e.commit;n("TOGGLE_DEVICE",t)}},_={namespaced:!0,state:x,mutations:y,actions:k},C=n("83d6"),O=n.n(C),S=O.a.showSettings,z=O.a.fixedHeader,B=O.a.sidebarLogo,M={showSettings:S,fixedHeader:z,sidebarLogo:B},H={CHANGE_SETTING:function(e,t){var n=t.key,a=t.value;e.hasOwnProperty(n)&&(e[n]=a)}},T={changeSetting:function(e,t){var n=e.commit;n("CHANGE_SETTING",t)}},E={namespaced:!0,state:M,mutations:H,actions:T},L=n("bc3a"),$=n.n(L),V=n("5f87"),A=$.a.create({baseURL:"/api",withCredentials:!0,timeout:5e3});A.interceptors.request.use(function(e){return bt.getters.token&&(e.headers["X-Token"]=Object(V["a"])()),e},function(e){return console.log(e),Promise.reject(e)}),A.interceptors.response.use(function(e){var t=e.data;return 2e4!==t.code?(Object(i["Message"])({message:t.message||"error",type:"error",duration:5e3}),50008!==t.code&&50012!==t.code&&50014!==t.code||i["MessageBox"].confirm("You have been logged out, you can cancel to stay on this page, or log in again","Confirm logout",{confirmButtonText:"Re-Login",cancelButtonText:"Cancel",type:"warning"}).then(function(){bt.dispatch("user/resetToken").then(function(){location.reload()})}),Promise.reject(t.message||"error")):t},function(e){return console.log("err"+e),Object(i["Message"])({message:e.message,type:"error",duration:5e3}),Promise.reject(e)});var j=A;function I(e){return j({url:"/user/login",method:"post",data:e})}function P(e){return j({url:"/user/info",method:"get",params:{token:e}})}function N(){return j({url:"/user/logout",method:"post"})}var D=n("8c4f"),R=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"app-wrapper",class:e.classObj},["mobile"===e.device&&e.sidebar.opened?n("div",{staticClass:"drawer-bg",on:{click:e.handleClickOutside}}):e._e(),e._v(" "),n("sidebar",{staticClass:"sidebar-container"}),e._v(" "),n("div",{staticClass:"main-container"},[n("div",{class:{"fixed-header":e.fixedHeader}},[n("navbar")],1),e._v(" "),n("app-main")],1)],1)},q=[],G=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"navbar"},[n("hamburger",{staticClass:"hamburger-container",attrs:{"is-active":e.sidebar.opened},on:{toggleClick:e.toggleSideBar}}),e._v(" "),n("breadcrumb",{staticClass:"breadcrumb-container"}),e._v(" "),n("div",{staticClass:"right-menu"},[n("el-button",{staticStyle:{"margin-right":"10px"},attrs:{type:"text"},on:{click:e.doLogout}},[e._v("退出")])],1)],1)},F=[],U=n("db72"),K=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-breadcrumb",{staticClass:"app-breadcrumb",attrs:{separator:"/"}},[n("transition-group",{attrs:{name:"breadcrumb"}},e._l(e.levelList,function(t,a){return n("el-breadcrumb-item",{key:t.path},["noRedirect"===t.redirect||a==e.levelList.length-1?n("span",{staticClass:"no-redirect"},[e._v(e._s(t.meta.title))]):n("a",{on:{click:function(n){return n.preventDefault(),e.handleLink(t)}}},[e._v(e._s(t.meta.title))])])}),1)],1)},W=[],J=n("bd11"),X=n.n(J),Y={data:function(){return{levelList:null}},watch:{$route:function(){this.getBreadcrumb()}},created:function(){this.getBreadcrumb()},methods:{getBreadcrumb:function(){var e=this.$route.matched.filter(function(e){return e.meta&&e.meta.title}),t=e[0];this.isDashboard(t)||(e=[{path:"/dashboard",meta:{title:"Dashboard"}}].concat(e)),this.levelList=e.filter(function(e){return e.meta&&e.meta.title&&!1!==e.meta.breadcrumb})},isDashboard:function(e){var t=e&&e.name;return!!t&&t.trim().toLocaleLowerCase()==="Dashboard".toLocaleLowerCase()},pathCompile:function(e){var t=this.$route.params,n=X.a.compile(e);return n(t)},handleLink:function(e){var t=e.redirect,n=e.path;t?this.$router.push(t):this.$router.push(this.pathCompile(n))}}},Q=Y,Z=(n("34c8"),Object(m["a"])(Q,K,W,!1,null,"62cc9144",null)),ee=Z.exports,te=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"0 15px"},on:{click:e.toggleClick}},[n("svg",{staticClass:"hamburger",class:{"is-active":e.isActive},attrs:{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64"}},[n("path",{attrs:{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z"}})])])},ne=[],ae={name:"Hamburger",props:{isActive:{type:Boolean,default:!1}},methods:{toggleClick:function(){this.$emit("toggleClick")}}},ie=ae,oe=(n("186a"),Object(m["a"])(ie,te,ne,!1,null,"49e15297",null)),re=oe.exports,ce={components:{Breadcrumb:ee,Hamburger:re},computed:Object(U["a"])({},Object(p["b"])(["sidebar","avatar"])),methods:{toggleSideBar:function(){this.$store.dispatch("app/toggleSideBar")},doLogout:function(){this.logout()}}},se=ce,ue=(n("405a"),Object(m["a"])(se,G,F,!1,null,"1eff5c58",null)),le=ue.exports,de=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:{"has-logo":e.showLogo}},[e.showLogo?n("logo",{attrs:{collapse:e.isCollapse}}):e._e(),e._v(" "),n("el-scrollbar",{attrs:{"wrap-class":"scrollbar-wrapper"}},[n("el-menu",{attrs:{"default-active":e.activeMenu,collapse:e.isCollapse,"background-color":e.variables.menuBg,"text-color":e.variables.menuText,"unique-opened":!1,"active-text-color":e.variables.menuActiveText,"collapse-transition":!1,mode:"vertical"}},e._l(e.routes,function(e){return n("sidebar-item",{key:e.path,attrs:{item:e,"base-path":e.path}})}),1)],1)],1)},me=[],he=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"sidebar-logo-container",class:{collapse:e.collapse}},[n("transition",{attrs:{name:"sidebarLogoFade"}},[e.collapse?n("router-link",{key:"collapse",staticClass:"sidebar-logo-link",attrs:{to:"/"}},[e.logo?n("img",{staticClass:"sidebar-logo",attrs:{src:e.logo}}):n("h1",{staticClass:"sidebar-title"},[e._v(e._s(e.title)+" ")])]):n("router-link",{key:"expand",staticClass:"sidebar-logo-link",attrs:{to:"/"}},[e.logo?n("img",{staticClass:"sidebar-logo",attrs:{src:e.logo}}):e._e(),e._v(" "),n("h1",{staticClass:"sidebar-title"},[e._v(e._s(e.title)+" ")])])],1)],1)},fe=[],pe={name:"SidebarLogo",props:{collapse:{type:Boolean,required:!0}},data:function(){return{title:"SOP Admin",logo:"https://wpimg.wallstcn.com/69a1c46c-eb1c-4b46-8bd4-e9e686ef5251.png"}}},ve=pe,be=(n("7c27"),Object(m["a"])(ve,he,fe,!1,null,"b905289c",null)),ge=be.exports,we=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.item.hidden?e._e():n("div",{staticClass:"menu-wrapper"},[!e.hasOneShowingChild(e.item.children,e.item)||e.onlyOneChild.children&&!e.onlyOneChild.noShowingChildren||e.item.alwaysShow?n("el-submenu",{ref:"subMenu",attrs:{index:e.resolvePath(e.item.path),"popper-append-to-body":""}},[n("template",{slot:"title"},[e.item.meta?n("item",{attrs:{icon:e.item.meta&&e.item.meta.icon,title:e.item.meta.title}}):e._e()],1),e._v(" "),e._l(e.item.children,function(t){return n("sidebar-item",{key:t.path,staticClass:"nest-menu",attrs:{"is-nest":!0,item:t,"base-path":e.resolvePath(t.path)}})})],2):[e.onlyOneChild.meta?n("app-link",{attrs:{to:e.resolvePath(e.onlyOneChild.path)}},[n("el-menu-item",{class:{"submenu-title-noDropdown":!e.isNest},attrs:{index:e.resolvePath(e.onlyOneChild.path)}},[n("item",{attrs:{icon:e.onlyOneChild.meta.icon||e.item.meta&&e.item.meta.icon,title:e.onlyOneChild.meta.title}})],1)],1):e._e()]],2)},xe=[],ye=n("df7c"),ke=n.n(ye);function _e(e){return/^(https?:|mailto:|tel:)/.test(e)}var Ce,Oe,Se={name:"MenuItem",functional:!0,props:{icon:{type:String,default:""},title:{type:String,default:""}},render:function(e,t){var n=t.props,a=n.icon,i=n.title,o=[];return a&&o.push(e("svg-icon",{attrs:{"icon-class":a}})),i&&o.push(e("span",{slot:"title"},[i])),o}},ze=Se,Be=Object(m["a"])(ze,Ce,Oe,!1,null,null,null),Me=Be.exports,He=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("component",e._b({},"component",e.linkProps(e.to),!1),[e._t("default")],2)},Te=[],Ee={props:{to:{type:String,required:!0}},methods:{linkProps:function(e){return _e(e)?{is:"a",href:e,target:"_blank",rel:"noopener"}:{is:"router-link",to:e}}}},Le=Ee,$e=Object(m["a"])(Le,He,Te,!1,null,null,null),Ve=$e.exports,Ae={computed:{device:function(){return this.$store.state.app.device}},mounted:function(){this.fixBugIniOS()},methods:{fixBugIniOS:function(){var e=this,t=this.$refs.subMenu;if(t){var n=t.handleMouseleave;t.handleMouseleave=function(t){"mobile"!==e.device&&n(t)}}}}},je={name:"SidebarItem",components:{Item:Me,AppLink:Ve},mixins:[Ae],props:{item:{type:Object,required:!0},isNest:{type:Boolean,default:!1},basePath:{type:String,default:""}},data:function(){return this.onlyOneChild=null,{}},methods:{hasOneShowingChild:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0,a=t.filter(function(t){return!t.hidden&&(e.onlyOneChild=t,!0)});return 1===a.length||0===a.length&&(this.onlyOneChild=Object(U["a"])({},n,{path:"",noShowingChildren:!0}),!0)},resolvePath:function(e){return _e(e)?e:_e(this.basePath)?this.basePath:ke.a.resolve(this.basePath,e)}}},Ie=je,Pe=Object(m["a"])(Ie,we,xe,!1,null,null,null),Ne=Pe.exports,De=n("cf1e"),Re=n.n(De),qe={components:{SidebarItem:Ne,Logo:ge},computed:Object(U["a"])({},Object(p["b"])(["sidebar"]),{routes:function(){return this.$router.options.routes},activeMenu:function(){var e=this.$route,t=e.meta,n=e.path;return t.activeMenu?t.activeMenu:n},showLogo:function(){return this.$store.state.settings.sidebarLogo},variables:function(){return Re.a},isCollapse:function(){return!this.sidebar.opened}})},Ge=qe,Fe=Object(m["a"])(Ge,de,me,!1,null,null,null),Ue=Fe.exports,Ke=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",{staticClass:"app-main"},[n("transition",{attrs:{name:"fade-transform",mode:"out-in"}},[n("router-view",{key:e.key})],1)],1)},We=[],Je={name:"AppMain",computed:{key:function(){return this.$route.fullPath}}},Xe=Je,Ye=(n("50be"),Object(m["a"])(Xe,Ke,We,!1,null,"43c24f68",null)),Qe=Ye.exports,Ze=document,et=Ze.body,tt=992,nt={watch:{$route:function(e){"mobile"===this.device&&this.sidebar.opened&&bt.dispatch("app/closeSideBar",{withoutAnimation:!1})}},beforeMount:function(){window.addEventListener("resize",this.$_resizeHandler)},beforeDestroy:function(){window.removeEventListener("resize",this.$_resizeHandler)},mounted:function(){var e=this.$_isMobile();e&&(bt.dispatch("app/toggleDevice","mobile"),bt.dispatch("app/closeSideBar",{withoutAnimation:!0}))},methods:{$_isMobile:function(){var e=et.getBoundingClientRect();return e.width-1'});r.a.add(c);t["default"]=c},"9f2b":function(e,t,n){"use strict";var a=n("bf90"),i=n.n(a);i.a},b20f:function(e,t,n){e.exports={menuText:"#bfcbd9",menuActiveText:"#409EFF",subMenuActiveText:"#f4f4f5",menuBg:"#304156",menuHover:"#263445",subMenuBg:"#1f2d3d",subMenuHover:"#001528",sideBarWidth:"210px"}},b3b5:function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),r=n.n(o),c=new i.a({id:"icon-user",use:"icon-user-usage",viewBox:"0 0 130 130",content:''});r.a.add(c);t["default"]=c},bf90:function(e,t,n){},cf1e:function(e,t,n){e.exports={menuText:"#bfcbd9",menuActiveText:"#409EFF",subMenuActiveText:"#f4f4f5",menuBg:"#304156",menuHover:"#263445",subMenuBg:"#1f2d3d",subMenuHover:"#001528",sideBarWidth:"210px"}},d7ec:function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),r=n.n(o),c=new i.a({id:"icon-eye-open",use:"icon-eye-open-usage",viewBox:"0 0 1024 1024",content:''});r.a.add(c);t["default"]=c},dc52:function(e,t,n){},dcf8:function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),r=n.n(o),c=new i.a({id:"icon-nested",use:"icon-nested-usage",viewBox:"0 0 128 128",content:''});r.a.add(c);t["default"]=c},eb1b:function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),r=n.n(o),c=new i.a({id:"icon-form",use:"icon-form-usage",viewBox:"0 0 128 128",content:''});r.a.add(c);t["default"]=c},f782:function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),r=n.n(o),c=new i.a({id:"icon-dashboard",use:"icon-dashboard-usage",viewBox:"0 0 128 100",content:''});r.a.add(c);t["default"]=c}},[[0,"runtime","chunk-elementUI","chunk-libs"]]]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["app"],{0:function(e,t,n){e.exports=n("56d7")},"0a7b":function(e,t,n){},"0cb8":function(e,t,n){},"186a":function(e,t,n){"use strict";var a=n("dc52"),i=n.n(a);i.a},"18f0":function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),r=n.n(o),c=new i.a({id:"icon-link",use:"icon-link-usage",viewBox:"0 0 128 128",content:''});r.a.add(c);t["default"]=c},2536:function(e,t,n){},"2a3d":function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),r=n.n(o),c=new i.a({id:"icon-password",use:"icon-password-usage",viewBox:"0 0 128 128",content:''});r.a.add(c);t["default"]=c},"30c3":function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),r=n.n(o),c=new i.a({id:"icon-example",use:"icon-example-usage",viewBox:"0 0 128 128",content:''});r.a.add(c);t["default"]=c},"34c8":function(e,t,n){"use strict";var a=n("88a1"),i=n.n(a);i.a},"405a":function(e,t,n){"use strict";var a=n("4a83"),i=n.n(a);i.a},"47f1":function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),r=n.n(o),c=new i.a({id:"icon-table",use:"icon-table-usage",viewBox:"0 0 128 128",content:''});r.a.add(c);t["default"]=c},"4a83":function(e,t,n){},"4df5":function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),r=n.n(o),c=new i.a({id:"icon-eye",use:"icon-eye-usage",viewBox:"0 0 128 64",content:''});r.a.add(c);t["default"]=c},"50be":function(e,t,n){"use strict";var a=n("2536"),i=n.n(a);i.a},"51ff":function(e,t,n){var a={"./dashboard.svg":"f782","./example.svg":"30c3","./eye-open.svg":"d7ec","./eye.svg":"4df5","./form.svg":"eb1b","./link.svg":"18f0","./nested.svg":"dcf8","./password.svg":"2a3d","./table.svg":"47f1","./tree.svg":"93cd","./user.svg":"b3b5"};function i(e){var t=o(e);return n(t)}function o(e){var t=a[e];if(!(t+1)){var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}return t}i.keys=function(){return Object.keys(a)},i.resolve=o,e.exports=i,i.id="51ff"},"56d7":function(e,t,n){"use strict";n.r(t);n("cadf"),n("551c"),n("f751"),n("097d");var a=n("2b0e"),i=(n("f5df"),n("5c96")),o=n.n(i),r=(n("0fae"),n("f0d9")),c=n.n(r),s=(n("b20f"),function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:"app"}},[n("router-view")],1)}),u=[],l={name:"App"},d=l,m=n("2877"),h=Object(m["a"])(d,s,u,!1,null,null,null),f=h.exports,p=n("2f62"),v=(n("7f7f"),{sidebar:function(e){return e.app.sidebar},device:function(e){return e.app.device},token:function(e){return e.user.token},avatar:function(e){return e.user.avatar},name:function(e){return e.user.name}}),b=v,g=n("a78e"),w=n.n(g),x={sidebar:{opened:!w.a.get("sidebarStatus")||!!+w.a.get("sidebarStatus"),withoutAnimation:!1},device:"desktop"},y={TOGGLE_SIDEBAR:function(e){e.sidebar.opened=!e.sidebar.opened,e.sidebar.withoutAnimation=!1,e.sidebar.opened?w.a.set("sidebarStatus",1):w.a.set("sidebarStatus",0)},CLOSE_SIDEBAR:function(e,t){w.a.set("sidebarStatus",0),e.sidebar.opened=!1,e.sidebar.withoutAnimation=t},TOGGLE_DEVICE:function(e,t){e.device=t}},k={toggleSideBar:function(e){var t=e.commit;t("TOGGLE_SIDEBAR")},closeSideBar:function(e,t){var n=e.commit,a=t.withoutAnimation;n("CLOSE_SIDEBAR",a)},toggleDevice:function(e,t){var n=e.commit;n("TOGGLE_DEVICE",t)}},_={namespaced:!0,state:x,mutations:y,actions:k},C=n("83d6"),O=n.n(C),S=O.a.showSettings,z=O.a.fixedHeader,B=O.a.sidebarLogo,M={showSettings:S,fixedHeader:z,sidebarLogo:B},H={CHANGE_SETTING:function(e,t){var n=t.key,a=t.value;e.hasOwnProperty(n)&&(e[n]=a)}},T={changeSetting:function(e,t){var n=e.commit;n("CHANGE_SETTING",t)}},E={namespaced:!0,state:M,mutations:H,actions:T},L=n("bc3a"),$=n.n(L),V=n("5f87"),A=$.a.create({baseURL:"/api",withCredentials:!0,timeout:5e3});A.interceptors.request.use(function(e){return bt.getters.token&&(e.headers["X-Token"]=Object(V["a"])()),e},function(e){return console.log(e),Promise.reject(e)}),A.interceptors.response.use(function(e){var t=e.data;return 2e4!==t.code?(Object(i["Message"])({message:t.message||"error",type:"error",duration:5e3}),50008!==t.code&&50012!==t.code&&50014!==t.code||i["MessageBox"].confirm("You have been logged out, you can cancel to stay on this page, or log in again","Confirm logout",{confirmButtonText:"Re-Login",cancelButtonText:"Cancel",type:"warning"}).then(function(){bt.dispatch("user/resetToken").then(function(){location.reload()})}),Promise.reject(t.message||"error")):t},function(e){return console.log("err"+e),Object(i["Message"])({message:e.message,type:"error",duration:5e3}),Promise.reject(e)});var j=A;function I(e){return j({url:"/user/login",method:"post",data:e})}function P(e){return j({url:"/user/info",method:"get",params:{token:e}})}function N(){return j({url:"/user/logout",method:"post"})}var D=n("8c4f"),R=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"app-wrapper",class:e.classObj},["mobile"===e.device&&e.sidebar.opened?n("div",{staticClass:"drawer-bg",on:{click:e.handleClickOutside}}):e._e(),e._v(" "),n("sidebar",{staticClass:"sidebar-container"}),e._v(" "),n("div",{staticClass:"main-container"},[n("div",{class:{"fixed-header":e.fixedHeader}},[n("navbar")],1),e._v(" "),n("app-main")],1)],1)},q=[],G=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"navbar"},[n("hamburger",{staticClass:"hamburger-container",attrs:{"is-active":e.sidebar.opened},on:{toggleClick:e.toggleSideBar}}),e._v(" "),n("breadcrumb",{staticClass:"breadcrumb-container"}),e._v(" "),n("div",{staticClass:"right-menu"},[n("el-button",{staticStyle:{"margin-right":"10px"},attrs:{type:"text"},on:{click:e.doLogout}},[e._v("退出")])],1)],1)},F=[],U=n("db72"),K=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-breadcrumb",{staticClass:"app-breadcrumb",attrs:{separator:"/"}},[n("transition-group",{attrs:{name:"breadcrumb"}},e._l(e.levelList,function(t,a){return n("el-breadcrumb-item",{key:t.path},["noRedirect"===t.redirect||a==e.levelList.length-1?n("span",{staticClass:"no-redirect"},[e._v(e._s(t.meta.title))]):n("a",{on:{click:function(n){return n.preventDefault(),e.handleLink(t)}}},[e._v(e._s(t.meta.title))])])}),1)],1)},W=[],J=n("bd11"),X=n.n(J),Y={data:function(){return{levelList:null}},watch:{$route:function(){this.getBreadcrumb()}},created:function(){this.getBreadcrumb()},methods:{getBreadcrumb:function(){var e=this.$route.matched.filter(function(e){return e.meta&&e.meta.title}),t=e[0];this.isDashboard(t)||(e=[{path:"/dashboard",meta:{title:"Dashboard"}}].concat(e)),this.levelList=e.filter(function(e){return e.meta&&e.meta.title&&!1!==e.meta.breadcrumb})},isDashboard:function(e){var t=e&&e.name;return!!t&&t.trim().toLocaleLowerCase()==="Dashboard".toLocaleLowerCase()},pathCompile:function(e){var t=this.$route.params,n=X.a.compile(e);return n(t)},handleLink:function(e){var t=e.redirect,n=e.path;t?this.$router.push(t):this.$router.push(this.pathCompile(n))}}},Q=Y,Z=(n("34c8"),Object(m["a"])(Q,K,W,!1,null,"62cc9144",null)),ee=Z.exports,te=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"0 15px"},on:{click:e.toggleClick}},[n("svg",{staticClass:"hamburger",class:{"is-active":e.isActive},attrs:{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64"}},[n("path",{attrs:{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z"}})])])},ne=[],ae={name:"Hamburger",props:{isActive:{type:Boolean,default:!1}},methods:{toggleClick:function(){this.$emit("toggleClick")}}},ie=ae,oe=(n("186a"),Object(m["a"])(ie,te,ne,!1,null,"49e15297",null)),re=oe.exports,ce={components:{Breadcrumb:ee,Hamburger:re},computed:Object(U["a"])({},Object(p["b"])(["sidebar","avatar"])),methods:{toggleSideBar:function(){this.$store.dispatch("app/toggleSideBar")},doLogout:function(){this.logout()}}},se=ce,ue=(n("405a"),Object(m["a"])(se,G,F,!1,null,"1eff5c58",null)),le=ue.exports,de=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:{"has-logo":e.showLogo}},[e.showLogo?n("logo",{attrs:{collapse:e.isCollapse}}):e._e(),e._v(" "),n("el-scrollbar",{attrs:{"wrap-class":"scrollbar-wrapper"}},[n("el-menu",{attrs:{"default-active":e.activeMenu,collapse:e.isCollapse,"background-color":e.variables.menuBg,"text-color":e.variables.menuText,"unique-opened":!1,"active-text-color":e.variables.menuActiveText,"collapse-transition":!1,mode:"vertical"}},e._l(e.routes,function(e){return n("sidebar-item",{key:e.path,attrs:{item:e,"base-path":e.path}})}),1)],1)],1)},me=[],he=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"sidebar-logo-container",class:{collapse:e.collapse}},[n("transition",{attrs:{name:"sidebarLogoFade"}},[e.collapse?n("router-link",{key:"collapse",staticClass:"sidebar-logo-link",attrs:{to:"/"}},[e.logo?n("img",{staticClass:"sidebar-logo",attrs:{src:e.logo}}):n("h1",{staticClass:"sidebar-title"},[e._v(e._s(e.title)+" ")])]):n("router-link",{key:"expand",staticClass:"sidebar-logo-link",attrs:{to:"/"}},[e.logo?n("img",{staticClass:"sidebar-logo",attrs:{src:e.logo}}):e._e(),e._v(" "),n("h1",{staticClass:"sidebar-title"},[e._v(e._s(e.title)+" ")])])],1)],1)},fe=[],pe={name:"SidebarLogo",props:{collapse:{type:Boolean,required:!0}},data:function(){return{title:"SOP Admin",logo:"https://wpimg.wallstcn.com/69a1c46c-eb1c-4b46-8bd4-e9e686ef5251.png"}}},ve=pe,be=(n("7c27"),Object(m["a"])(ve,he,fe,!1,null,"b905289c",null)),ge=be.exports,we=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.item.hidden?e._e():n("div",{staticClass:"menu-wrapper"},[!e.hasOneShowingChild(e.item.children,e.item)||e.onlyOneChild.children&&!e.onlyOneChild.noShowingChildren||e.item.alwaysShow?n("el-submenu",{ref:"subMenu",attrs:{index:e.resolvePath(e.item.path),"popper-append-to-body":""}},[n("template",{slot:"title"},[e.item.meta?n("item",{attrs:{icon:e.item.meta&&e.item.meta.icon,title:e.item.meta.title}}):e._e()],1),e._v(" "),e._l(e.item.children,function(t){return n("sidebar-item",{key:t.path,staticClass:"nest-menu",attrs:{"is-nest":!0,item:t,"base-path":e.resolvePath(t.path)}})})],2):[e.onlyOneChild.meta?n("app-link",{attrs:{to:e.resolvePath(e.onlyOneChild.path)}},[n("el-menu-item",{class:{"submenu-title-noDropdown":!e.isNest},attrs:{index:e.resolvePath(e.onlyOneChild.path)}},[n("item",{attrs:{icon:e.onlyOneChild.meta.icon||e.item.meta&&e.item.meta.icon,title:e.onlyOneChild.meta.title}})],1)],1):e._e()]],2)},xe=[],ye=n("df7c"),ke=n.n(ye);function _e(e){return/^(https?:|mailto:|tel:)/.test(e)}var Ce,Oe,Se={name:"MenuItem",functional:!0,props:{icon:{type:String,default:""},title:{type:String,default:""}},render:function(e,t){var n=t.props,a=n.icon,i=n.title,o=[];return a&&o.push(e("svg-icon",{attrs:{"icon-class":a}})),i&&o.push(e("span",{slot:"title"},[i])),o}},ze=Se,Be=Object(m["a"])(ze,Ce,Oe,!1,null,null,null),Me=Be.exports,He=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("component",e._b({},"component",e.linkProps(e.to),!1),[e._t("default")],2)},Te=[],Ee={props:{to:{type:String,required:!0}},methods:{linkProps:function(e){return _e(e)?{is:"a",href:e,target:"_blank",rel:"noopener"}:{is:"router-link",to:e}}}},Le=Ee,$e=Object(m["a"])(Le,He,Te,!1,null,null,null),Ve=$e.exports,Ae={computed:{device:function(){return this.$store.state.app.device}},mounted:function(){this.fixBugIniOS()},methods:{fixBugIniOS:function(){var e=this,t=this.$refs.subMenu;if(t){var n=t.handleMouseleave;t.handleMouseleave=function(t){"mobile"!==e.device&&n(t)}}}}},je={name:"SidebarItem",components:{Item:Me,AppLink:Ve},mixins:[Ae],props:{item:{type:Object,required:!0},isNest:{type:Boolean,default:!1},basePath:{type:String,default:""}},data:function(){return this.onlyOneChild=null,{}},methods:{hasOneShowingChild:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0,a=t.filter(function(t){return!t.hidden&&(e.onlyOneChild=t,!0)});return 1===a.length||0===a.length&&(this.onlyOneChild=Object(U["a"])({},n,{path:"",noShowingChildren:!0}),!0)},resolvePath:function(e){return _e(e)?e:_e(this.basePath)?this.basePath:ke.a.resolve(this.basePath,e)}}},Ie=je,Pe=Object(m["a"])(Ie,we,xe,!1,null,null,null),Ne=Pe.exports,De=n("cf1e"),Re=n.n(De),qe={components:{SidebarItem:Ne,Logo:ge},computed:Object(U["a"])({},Object(p["b"])(["sidebar"]),{routes:function(){return this.$router.options.routes},activeMenu:function(){var e=this.$route,t=e.meta,n=e.path;return t.activeMenu?t.activeMenu:n},showLogo:function(){return this.$store.state.settings.sidebarLogo},variables:function(){return Re.a},isCollapse:function(){return!this.sidebar.opened}})},Ge=qe,Fe=Object(m["a"])(Ge,de,me,!1,null,null,null),Ue=Fe.exports,Ke=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",{staticClass:"app-main"},[n("transition",{attrs:{name:"fade-transform",mode:"out-in"}},[n("router-view",{key:e.key})],1)],1)},We=[],Je={name:"AppMain",computed:{key:function(){return this.$route.fullPath}}},Xe=Je,Ye=(n("50be"),Object(m["a"])(Xe,Ke,We,!1,null,"43c24f68",null)),Qe=Ye.exports,Ze=document,et=Ze.body,tt=992,nt={watch:{$route:function(e){"mobile"===this.device&&this.sidebar.opened&&bt.dispatch("app/closeSideBar",{withoutAnimation:!1})}},beforeMount:function(){window.addEventListener("resize",this.$_resizeHandler)},beforeDestroy:function(){window.removeEventListener("resize",this.$_resizeHandler)},mounted:function(){var e=this.$_isMobile();e&&(bt.dispatch("app/toggleDevice","mobile"),bt.dispatch("app/closeSideBar",{withoutAnimation:!0}))},methods:{$_isMobile:function(){var e=et.getBoundingClientRect();return e.width-1'});r.a.add(c);t["default"]=c},"9f2b":function(e,t,n){"use strict";var a=n("bf90"),i=n.n(a);i.a},b20f:function(e,t,n){e.exports={menuText:"#bfcbd9",menuActiveText:"#409EFF",subMenuActiveText:"#f4f4f5",menuBg:"#304156",menuHover:"#263445",subMenuBg:"#1f2d3d",subMenuHover:"#001528",sideBarWidth:"210px"}},b3b5:function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),r=n.n(o),c=new i.a({id:"icon-user",use:"icon-user-usage",viewBox:"0 0 130 130",content:''});r.a.add(c);t["default"]=c},bf90:function(e,t,n){},cf1e:function(e,t,n){e.exports={menuText:"#bfcbd9",menuActiveText:"#409EFF",subMenuActiveText:"#f4f4f5",menuBg:"#304156",menuHover:"#263445",subMenuBg:"#1f2d3d",subMenuHover:"#001528",sideBarWidth:"210px"}},d7ec:function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),r=n.n(o),c=new i.a({id:"icon-eye-open",use:"icon-eye-open-usage",viewBox:"0 0 1024 1024",content:''});r.a.add(c);t["default"]=c},dc52:function(e,t,n){},dcf8:function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),r=n.n(o),c=new i.a({id:"icon-nested",use:"icon-nested-usage",viewBox:"0 0 128 128",content:''});r.a.add(c);t["default"]=c},eb1b:function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),r=n.n(o),c=new i.a({id:"icon-form",use:"icon-form-usage",viewBox:"0 0 128 128",content:''});r.a.add(c);t["default"]=c},f782:function(e,t,n){"use strict";n.r(t);var a=n("e017"),i=n.n(a),o=n("21a1"),r=n.n(o),c=new i.a({id:"icon-dashboard",use:"icon-dashboard-usage",viewBox:"0 0 128 100",content:''});r.a.add(c);t["default"]=c}},[[0,"runtime","chunk-elementUI","chunk-libs"]]]); \ No newline at end of file diff --git a/sop-admin/sop-admin-server/src/main/resources/public/static/js/chunk-42f006d4.a9dde27f.js b/sop-admin/sop-admin-server/src/main/resources/public/static/js/chunk-42f006d4.a9dde27f.js deleted file mode 100644 index 16b1d6ce..00000000 --- a/sop-admin/sop-admin-server/src/main/resources/public/static/js/chunk-42f006d4.a9dde27f.js +++ /dev/null @@ -1 +0,0 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-42f006d4"],{"0a49":function(e,t,i){var a=i("9b43"),o=i("626a"),l=i("4bf8"),r=i("9def"),n=i("cd1c");e.exports=function(e,t){var i=1==e,s=2==e,c=3==e,m=4==e,p=6==e,u=5==e||p,d=t||n;return function(t,n,f){for(var g,h,D=l(t),v=o(D),y=a(n,f,3),b=r(v.length),k=0,x=i?d(t,b):s?d(t,0):void 0;b>k;k++)if((u||k in v)&&(g=v[k],h=y(g,k,D),e))if(i)x[k]=h;else if(h)switch(e){case 3:return!0;case 5:return g;case 6:return k;case 2:x.push(g)}else if(m)return!1;return p?-1:c||m?m:x}}},1169:function(e,t,i){var a=i("2d95");e.exports=Array.isArray||function(e){return"Array"==a(e)}},2735:function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"app-container"},[i("el-container",[i("el-aside",{staticStyle:{"min-height":"300px",width:"250px"}},[i("el-input",{staticStyle:{"margin-bottom":"20px"},attrs:{"prefix-icon":"el-icon-search",placeholder:"搜索服务...",size:"mini",clearable:""},model:{value:e.filterText,callback:function(t){e.filterText=t},expression:"filterText"}}),e._v(" "),i("el-tree",{ref:"tree2",staticClass:"filter-tree",attrs:{data:e.treeData,props:e.defaultProps,"filter-node-method":e.filterNode,"highlight-current":!0,"expand-on-click-node":!1,"empty-text":"无数据","node-key":"id","default-expand-all":""},on:{"node-click":e.onNodeClick},scopedSlots:e._u([{key:"default",fn:function(t){t.node;var a=t.data;return i("span",{staticClass:"custom-tree-node"},[i("div",[i("el-tooltip",{directives:[{name:"show",rawName:"v-show",value:a.custom,expression:"data.custom"}],staticClass:"item",attrs:{content:"自定义服务",effect:"light",placement:"left"}},[i("i",{staticClass:"el-icon-warning-outline"})]),e._v(" "),a.label.length"+t;this.$alert(i,"限流策略",{dangerouslyUseHTMLString:!0})},onSizeChange:function(e){this.searchFormData.pageSize=e,this.loadTable()},onPageIndexChange:function(e){this.searchFormData.pageIndex=e,this.loadTable()},checkTypeKey:function(e){return this.limitDialogFormData.typeKey.find(function(t,i,a){return t===e})},isWindowType:function(){return 1===this.limitDialogFormData.limitType},isTokenType:function(){return 2===this.limitDialogFormData.limitType},limitRender:function(e){var t=[],i=[];return e.routeId&&(i.push(e.routeId),t.push("路由ID")),e.appKey&&(i.push(e.appKey),t.push("AppKey")),e.limitIp&&(i.push(e.limitIp),t.push("IP")),i.join(" + ")+"
("+t.join(" + ")+")"}}}),r=l,n=(i("fbea"),i("80ba"),i("2877")),s=Object(n["a"])(r,a,o,!1,null,"3fb78f74",null);t["default"]=s.exports},"2a4f":function(e,t,i){},6886:function(e,t,i){},7514:function(e,t,i){"use strict";var a=i("5ca1"),o=i("0a49")(5),l="find",r=!0;l in[]&&Array(1)[l](function(){r=!1}),a(a.P+a.F*r,"Array",{find:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),i("9c6c")(l)},"80ba":function(e,t,i){"use strict";var a=i("2a4f"),o=i.n(a);o.a},cd1c:function(e,t,i){var a=i("e853");e.exports=function(e,t){return new(a(e))(t)}},e853:function(e,t,i){var a=i("d3f4"),o=i("1169"),l=i("2b4c")("species");e.exports=function(e){var t;return o(e)&&(t=e.constructor,"function"!=typeof t||t!==Array&&!o(t.prototype)||(t=void 0),a(t)&&(t=t[l],null===t&&(t=void 0))),void 0===t?Array:t}},fbea:function(e,t,i){"use strict";var a=i("6886"),o=i.n(a);o.a}}]); \ No newline at end of file diff --git a/sop-admin/sop-admin-server/src/main/resources/public/static/js/chunk-4bdcb5ea.cf292569.js b/sop-admin/sop-admin-server/src/main/resources/public/static/js/chunk-4bdcb5ea.cf292569.js new file mode 100644 index 00000000..032e04c2 --- /dev/null +++ b/sop-admin/sop-admin-server/src/main/resources/public/static/js/chunk-4bdcb5ea.cf292569.js @@ -0,0 +1 @@ +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4bdcb5ea"],{"0a49":function(e,t,i){var a=i("9b43"),o=i("626a"),l=i("4bf8"),r=i("9def"),n=i("cd1c");e.exports=function(e,t){var i=1==e,s=2==e,c=3==e,m=4==e,p=6==e,u=5==e||p,d=t||n;return function(t,n,f){for(var g,h,D=l(t),v=o(D),y=a(n,f,3),b=r(v.length),k=0,x=i?d(t,b):s?d(t,0):void 0;b>k;k++)if((u||k in v)&&(g=v[k],h=y(g,k,D),e))if(i)x[k]=h;else if(h)switch(e){case 3:return!0;case 5:return g;case 6:return k;case 2:x.push(g)}else if(m)return!1;return p?-1:c||m?m:x}}},1169:function(e,t,i){var a=i("2d95");e.exports=Array.isArray||function(e){return"Array"==a(e)}},2735:function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"app-container"},[i("el-container",[i("el-aside",{staticStyle:{"min-height":"300px",width:"250px"}},[i("el-input",{staticStyle:{"margin-bottom":"20px"},attrs:{"prefix-icon":"el-icon-search",placeholder:"搜索服务...",size:"mini",clearable:""},model:{value:e.filterText,callback:function(t){e.filterText=t},expression:"filterText"}}),e._v(" "),i("el-tree",{ref:"tree2",staticClass:"filter-tree",attrs:{data:e.treeData,props:e.defaultProps,"filter-node-method":e.filterNode,"highlight-current":!0,"expand-on-click-node":!1,"empty-text":"无数据","node-key":"id","default-expand-all":""},on:{"node-click":e.onNodeClick},scopedSlots:e._u([{key:"default",fn:function(t){t.node;var a=t.data;return i("span",{staticClass:"custom-tree-node"},[i("div",[i("el-tooltip",{directives:[{name:"show",rawName:"v-show",value:a.custom,expression:"data.custom"}],staticClass:"item",attrs:{content:"自定义服务",effect:"light",placement:"left"}},[i("i",{staticClass:"el-icon-warning-outline"})]),e._v(" "),a.label.length"+t;this.$alert(i,"限流策略",{dangerouslyUseHTMLString:!0})},onSizeChange:function(e){this.searchFormData.pageSize=e,this.loadTable()},onPageIndexChange:function(e){this.searchFormData.pageIndex=e,this.loadTable()},checkTypeKey:function(e){return this.limitDialogFormData.typeKey.find(function(t,i,a){return t===e})},isWindowType:function(){return 1===this.limitDialogFormData.limitType},isTokenType:function(){return 2===this.limitDialogFormData.limitType},limitRender:function(e){var t=[],i=[];return e.routeId&&(i.push(e.routeId),t.push("路由ID")),e.appKey&&(i.push(e.appKey),t.push("AppId")),e.limitIp&&(i.push(e.limitIp),t.push("IP")),i.join(" + ")+"
("+t.join(" + ")+")"}}}),r=l,n=(i("fbea"),i("8bb3"),i("2877")),s=Object(n["a"])(r,a,o,!1,null,"08125a7c",null);t["default"]=s.exports},"4b5b":function(e,t,i){},6886:function(e,t,i){},7514:function(e,t,i){"use strict";var a=i("5ca1"),o=i("0a49")(5),l="find",r=!0;l in[]&&Array(1)[l](function(){r=!1}),a(a.P+a.F*r,"Array",{find:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),i("9c6c")(l)},"8bb3":function(e,t,i){"use strict";var a=i("4b5b"),o=i.n(a);o.a},cd1c:function(e,t,i){var a=i("e853");e.exports=function(e,t){return new(a(e))(t)}},e853:function(e,t,i){var a=i("d3f4"),o=i("1169"),l=i("2b4c")("species");e.exports=function(e){var t;return o(e)&&(t=e.constructor,"function"!=typeof t||t!==Array&&!o(t.prototype)||(t=void 0),a(t)&&(t=t[l],null===t&&(t=void 0))),void 0===t?Array:t}},fbea:function(e,t,i){"use strict";var a=i("6886"),o=i.n(a);o.a}}]); \ No newline at end of file diff --git a/sop-admin/sop-admin-vue/src/views/service/limit.vue b/sop-admin/sop-admin-vue/src/views/service/limit.vue index 49c395d2..fb745dc9 100644 --- a/sop-admin/sop-admin-vue/src/views/service/limit.vue +++ b/sop-admin/sop-admin-vue/src/views/service/limit.vue @@ -177,8 +177,8 @@ - - + + @@ -495,7 +495,7 @@ export default { } if (row.appKey) { val.push(row.appKey) - html.push('AppKey') + html.push('AppId') } if (row.limitIp) { val.push(row.limitIp) diff --git a/sop-mysql5.6以下版本.sql b/sop-mysql5.6以下版本.sql index 9ac25404..66d3cf3a 100644 --- a/sop-mysql5.6以下版本.sql +++ b/sop-mysql5.6以下版本.sql @@ -3,12 +3,6 @@ CREATE DATABASE IF NOT EXISTS `sop` DEFAULT CHARACTER SET utf8 DEFAULT COLLATE u USE `sop`; - - -SET @PREVIOUS_FOREIGN_KEY_CHECKS = @@FOREIGN_KEY_CHECKS; -SET FOREIGN_KEY_CHECKS = 0; - - DROP TABLE IF EXISTS `user_info`; DROP TABLE IF EXISTS `perm_role_permission`; DROP TABLE IF EXISTS `perm_role`; @@ -232,47 +226,11 @@ CREATE TABLE `config_service_route` ( ) ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT='路由配置'; -SET FOREIGN_KEY_CHECKS = @PREVIOUS_FOREIGN_KEY_CHECKS; - - -SET @PREVIOUS_FOREIGN_KEY_CHECKS = @@FOREIGN_KEY_CHECKS; -SET FOREIGN_KEY_CHECKS = 0; - - -LOCK TABLES `admin_user_info` WRITE; -ALTER TABLE `admin_user_info` DISABLE KEYS; INSERT INTO `admin_user_info` (`id`, `username`, `password`, `status`, `gmt_create`, `gmt_modified`) VALUES (1,'admin','a62cd510fb9a8a557a27ef279569091f',1,'2019-04-02 19:55:26','2019-04-02 19:55:26'); ALTER TABLE `admin_user_info` ENABLE KEYS; -UNLOCK TABLES; - - -LOCK TABLES `config_common` WRITE; -ALTER TABLE `config_common` DISABLE KEYS; -ALTER TABLE `config_common` ENABLE KEYS; -UNLOCK TABLES; - -LOCK TABLES `config_gray` WRITE; -ALTER TABLE `config_gray` DISABLE KEYS; -ALTER TABLE `config_gray` ENABLE KEYS; -UNLOCK TABLES; - -LOCK TABLES `config_gray_instance` WRITE; -ALTER TABLE `config_gray_instance` DISABLE KEYS; -ALTER TABLE `config_gray_instance` ENABLE KEYS; -UNLOCK TABLES; - - -LOCK TABLES `config_ip_blacklist` WRITE; -ALTER TABLE `config_ip_blacklist` DISABLE KEYS; -ALTER TABLE `config_ip_blacklist` ENABLE KEYS; -UNLOCK TABLES; - - -LOCK TABLES `config_limit` WRITE; -ALTER TABLE `config_limit` DISABLE KEYS; INSERT INTO `config_limit` (`id`, `route_id`, `app_key`, `limit_ip`, `service_id`, `limit_type`, `exec_count_per_second`, `limit_code`, `limit_msg`, `token_bucket_count`, `limit_status`, `order_index`, `remark`, `gmt_create`, `gmt_modified`) VALUES (1,'alipay.story.get1.0','','192.168.1.1,172.2.2.3','story-service',2,5,'','',6,1,3,NULL,'2019-05-17 19:21:35','2019-05-21 09:12:15'), (2,'alipay.story.get1.0','2019032617262200001','','story-service',2,5,'service-budy','服务器忙',10,1,0,'','2019-05-17 19:39:30','2019-05-21 15:36:52'), @@ -282,12 +240,8 @@ INSERT INTO `config_limit` (`id`, `route_id`, `app_key`, `limit_ip`, `service_id (6,'','','10.1.30.54','story-service',1,5,'service-busy','服务器忙',5,1,0,'这个ip在攻击我们','2019-05-21 15:55:33','2019-05-21 18:17:29'), (7,'story.get1.1','','10.1.30.54','story-service',1,5,'service-busy','服务器忙',5,1,0,NULL,'2019-05-21 16:30:48','2019-05-21 16:30:48'), (8,'','20190513577548661718777857','10.1.30.54','story-service',1,5,'service-busy','服务器忙',5,1,0,NULL,'2019-05-21 17:10:45','2019-05-21 17:10:52'); -ALTER TABLE `config_limit` ENABLE KEYS; -UNLOCK TABLES; -LOCK TABLES `config_route_base` WRITE; -ALTER TABLE `config_route_base` DISABLE KEYS; INSERT INTO `config_route_base` (`id`, `route_id`, `status`, `gmt_create`, `gmt_modified`) VALUES (1,'story.get1.1',1,'2019-04-09 19:15:58','2019-04-09 19:16:54'), (2,'alipay.story.get1.0',1,'2019-04-09 19:19:57','2019-04-19 14:45:33'), @@ -297,23 +251,15 @@ INSERT INTO `config_route_base` (`id`, `route_id`, `status`, `gmt_create`, `gmt_ (6,'alipay.category.get1.0',1,'2019-05-06 16:50:39','2019-05-20 17:01:48'), (7,'permission.story.get1.0',1,'2019-05-06 20:03:17','2019-05-06 20:03:21'), (8,'goods.add1.0',1,'2019-05-13 17:23:00','2019-05-13 17:23:11'); -ALTER TABLE `config_route_base` ENABLE KEYS; -UNLOCK TABLES; -LOCK TABLES `config_route_limit` WRITE; -ALTER TABLE `config_route_limit` DISABLE KEYS; INSERT INTO `config_route_limit` (`id`, `route_id`, `service_id`, `limit_type`, `exec_count_per_second`, `limit_code`, `limit_msg`, `token_bucket_count`, `limit_status`, `gmt_create`, `gmt_modified`) VALUES (1,'alipay.story.find1.0','story-service',1,10,'isp.service-busy','服务器正忙',NULL,1,'2019-04-10 20:55:08','2019-04-10 21:04:35'), (2,'alipay.story.get1.0','story-service',2,5,'isp.service-busy','服务器正忙',5,0,'2019-04-10 21:05:51','2019-04-11 18:18:03'), (3,'alipay.story.get1.2','story-service',2,10,'isp.service-busy','服务器正忙',3,1,'2019-04-11 17:26:04','2019-04-11 18:19:33'), (4,'alipay.category.get1.0','story-service',1,5,'error-code','服务器忙',5,1,'2019-05-07 12:22:04','2019-05-07 12:25:06'); -ALTER TABLE `config_route_limit` ENABLE KEYS; -UNLOCK TABLES; -LOCK TABLES `isv_info` WRITE; -ALTER TABLE `isv_info` DISABLE KEYS; INSERT INTO `isv_info` (`id`, `app_key`, `status`, `sign_type`, `remark`, `gmt_create`, `gmt_modified`) VALUES (1,'2019032617262200001',1,1,NULL,'2019-03-27 10:10:34','2019-05-09 11:10:38'), (3,'asdfasdf',2,1,NULL,'2019-03-27 11:01:11','2019-05-11 10:45:01'), @@ -325,12 +271,8 @@ INSERT INTO `isv_info` (`id`, `app_key`, `status`, `sign_type`, `remark`, `gmt_c (10,'easyopen_test',1,2,NULL,'2019-04-19 17:19:34','2019-04-19 17:30:09'), (11,'20190513577548661718777856',1,1,NULL,'2019-05-13 17:24:17','2019-05-13 17:24:17'), (12,'20190513577548661718777857',1,1,NULL,'2019-05-13 17:24:17','2019-05-13 17:24:17'); -ALTER TABLE `isv_info` ENABLE KEYS; -UNLOCK TABLES; -LOCK TABLES `isv_keys` WRITE; -ALTER TABLE `isv_keys` DISABLE KEYS; INSERT INTO `isv_keys` (`id`, `app_key`, `sign_type`, `secret`, `key_format`, `public_key_isv`, `private_key_isv`, `public_key_platform`, `private_key_platform`, `gmt_create`, `gmt_modified`) VALUES (1,'2019032617262200001',1,'',1,'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlyb9aUBaljQP/vjmBFe1mF8HsWSvyfC2NTlpT/V9E+sBxTr8TSkbzJCeeeOEm4LCaVXL0Qz63MZoT24v7AIXTuMdj4jyiM/WJ4tjrWAgnmohNOegfntTto16C3l234vXz4ryWZMR/7W+MXy5B92wPGQEJ0LKFwNEoLspDEWZ7RdE53VH7w6y6sIZUfK+YkXWSwehfKPKlx+lDw3zRJ3/yvMF+U+BAdW/MfECe1GuBn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NM5z6SiWCdYm2pfngKih18AG3RI1L9uyvqEIBa7XtEaduAFor5lokPc1WpdVcTwTfRxgeJAgMBAAECgYAM3XFGL1k0aQiChiUCaEvJKTgAywLgHm/5dRC5JwKP8knqnn+I9P5QcV0jimPvaFjZ4VCdAvCjOC3EUNSvRn7wR2Lb1+BGZZePTdxtHWE2aqJ1W1SvgQTqMsLlPBRPnXo5XH/ng3WEH15ynd5NR035xAluaI0X/y+PsRxE6TlfIQJBAPSYUyXa2yaEqmvIN+ECKALCLLeDdi2YW3Kjahgz0X9V4Y4aTdrHh8y603zXC0Wy8HeOhwGoyciaS8SmjxCMn4UCQQDXweW8xsUreLH8hfVUtyiY/KgUz+R5foJDNXD7TLE9CDoPSHy09qBe99HyVCZg/gNJH4O+tNr6C4916dYaVk01AkBYZ2HOEc8ZmeOaty/zJHtfm9zbqykgi6upwISNINV8Z4bxfHJdO7bKeVANFBBf7a/aFmqXX/EmjxYJioW03o6dAkEAp7ViXJCtJpNU1pNSFZ2hgvmxtSu7zuyVWKSrw8rjYiuI5eRUe13RXsCHgzQB+Ra5exdyEsUGCaL+yosPD73RmQJBALGuM8EQUcBgrpgpeLZ39Ni1DYXYG9aj+u+ar/UL6kI1mCNFgwroO4EVIvXPVxikMxUgiE2tVaBML5nm8VDNJ7s=','','','2019-08-13 15:18:39','2019-08-13 15:18:39'), @@ -342,12 +284,8 @@ INSERT INTO `isv_keys` (`id`, `app_key`, `sign_type`, `secret`, `key_format`, `p (8,'easyopen_test',2,'G9w0BAQEFAAOCAQ8AMIIBCgKCA',1,'','','','','2019-08-13 15:18:39','2019-08-13 15:18:39'), (9,'20190513577548661718777856',1,'',1,'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCdGjz3IE2VQteDjQaFacXLCAIqdEIIVcf7LW7f142V55Q0xtcjDTOHjBHExZsG64/Y5WKz4oQVWGnXwtrled8Qg0YAA7ueat8mE8NzJSm9txbfU9hwXB77nJxVkFyaSG1p0IZFrNQpbbUxTX9755deP7DdcSF148LLr091V++S3QIDAQAB','MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAJ0aPPcgTZVC14ONBoVpxcsIAip0QghVx/stbt/XjZXnlDTG1yMNM4eMEcTFmwbrj9jlYrPihBVYadfC2uV53xCDRgADu55q3yYTw3MlKb23Ft9T2HBcHvucnFWQXJpIbWnQhkWs1ClttTFNf3vnl14/sN1xIXXjwsuvT3VX75LdAgMBAAECgYB68z/nQDa3q/oykDocS21qujfHtfi/wTKjVylAsdezC+wnab6RRhGf8XUuhGARiGWpn8whcBNjCTC8lVju4vQ5IIx4Hb74vwDDMtNXeqwkLmARLYu2ELibauezSeqom8/J8cR3ho7Hr4VHPTiC8qvePRmu8AvXVQz2T7SOhEjDGQJBAOm8XOivr+atiknLbQhmo508ON3sjoN9VMwK9cmnup+ZPCsurJTHRja0MJQNdOXObUVJ6wJhs1PHWT+vITfXGJ8CQQCsESzxOYTkZaqBUFjbWVf1rSwjOOsylweTuq44YIJkHhwMjHf3kN/UTXbxsBPUGeT7/+2K5UwQ9snUPr0yTBcDAkA0FMezBWqxgNu+g7iA1bYBVCjrskkzHVsmuA56Z4hbBZ71lEnaQOjxSYdFhhYVGsEYXlciSbjWoyXM3e4N7jzLAkB0ejv+H33CTsAZQZalBdnxSQTz4vf0CyDp9BkzuMELnQZHyF79i2i5gqbd/N+vWMgVfq4CtC3F3gnKT54rii6ZAkAMBIvHriT5Zbs1fW+oxBP1rHqdsRvqs1zEyIadvJgKAFwFEisryfdw2mWm3vxQQ22RlOquBiZEDIlyM0z2m9PJ','','','2019-08-13 15:18:39','2019-08-13 15:18:39'), (10,'20190513577548661718777857',1,'',1,'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCdGjz3IE2VQteDjQaFacXLCAIqdEIIVcf7LW7f142V55Q0xtcjDTOHjBHExZsG64/Y5WKz4oQVWGnXwtrled8Qg0YAA7ueat8mE8NzJSm9txbfU9hwXB77nJxVkFyaSG1p0IZFrNQpbbUxTX9755deP7DdcSF148LLr091V++S3QIDAQAB','MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAJ0aPPcgTZVC14ONBoVpxcsIAip0QghVx/stbt/XjZXnlDTG1yMNM4eMEcTFmwbrj9jlYrPihBVYadfC2uV53xCDRgADu55q3yYTw3MlKb23Ft9T2HBcHvucnFWQXJpIbWnQhkWs1ClttTFNf3vnl14/sN1xIXXjwsuvT3VX75LdAgMBAAECgYB68z/nQDa3q/oykDocS21qujfHtfi/wTKjVylAsdezC+wnab6RRhGf8XUuhGARiGWpn8whcBNjCTC8lVju4vQ5IIx4Hb74vwDDMtNXeqwkLmARLYu2ELibauezSeqom8/J8cR3ho7Hr4VHPTiC8qvePRmu8AvXVQz2T7SOhEjDGQJBAOm8XOivr+atiknLbQhmo508ON3sjoN9VMwK9cmnup+ZPCsurJTHRja0MJQNdOXObUVJ6wJhs1PHWT+vITfXGJ8CQQCsESzxOYTkZaqBUFjbWVf1rSwjOOsylweTuq44YIJkHhwMjHf3kN/UTXbxsBPUGeT7/+2K5UwQ9snUPr0yTBcDAkA0FMezBWqxgNu+g7iA1bYBVCjrskkzHVsmuA56Z4hbBZ71lEnaQOjxSYdFhhYVGsEYXlciSbjWoyXM3e4N7jzLAkB0ejv+H33CTsAZQZalBdnxSQTz4vf0CyDp9BkzuMELnQZHyF79i2i5gqbd/N+vWMgVfq4CtC3F3gnKT54rii6ZAkAMBIvHriT5Zbs1fW+oxBP1rHqdsRvqs1zEyIadvJgKAFwFEisryfdw2mWm3vxQQ22RlOquBiZEDIlyM0z2m9PJ','','','2019-08-13 15:18:39','2019-08-13 15:18:39'); -ALTER TABLE `isv_keys` ENABLE KEYS; -UNLOCK TABLES; -LOCK TABLES `perm_isv_role` WRITE; -ALTER TABLE `perm_isv_role` DISABLE KEYS; INSERT INTO `perm_isv_role` (`id`, `isv_id`, `role_code`, `gmt_create`, `gmt_modified`) VALUES (18,5,'normal','2019-03-31 22:07:50','2019-03-31 22:07:50'), (32,7,'normal','2019-04-01 20:27:33','2019-04-01 20:27:33'), @@ -357,37 +295,19 @@ INSERT INTO `perm_isv_role` (`id`, `isv_id`, `role_code`, `gmt_create`, `gmt_mod (52,6,'normal','2019-05-07 18:14:53','2019-05-07 18:14:53'), (57,1,'normal','2019-05-09 11:10:38','2019-05-09 11:10:38'), (58,11,'normal','2019-05-13 17:24:17','2019-05-13 17:24:17'); -ALTER TABLE `perm_isv_role` ENABLE KEYS; -UNLOCK TABLES; -LOCK TABLES `perm_role` WRITE; -ALTER TABLE `perm_role` DISABLE KEYS; INSERT INTO `perm_role` (`id`, `role_code`, `description`, `gmt_create`, `gmt_modified`) VALUES (1,'normal','普通权限','2019-03-29 15:00:10','2019-03-29 15:00:10'), (2,'vip','VIP权限','2019-03-29 15:00:27','2019-03-29 15:00:27'); -ALTER TABLE `perm_role` ENABLE KEYS; -UNLOCK TABLES; -LOCK TABLES `perm_role_permission` WRITE; -ALTER TABLE `perm_role_permission` DISABLE KEYS; INSERT INTO `perm_role_permission` (`id`, `role_code`, `route_id`, `gmt_create`, `gmt_modified`) VALUES (29,'normal','permission.story.get1.0','2019-05-06 18:29:16','2019-05-06 18:29:16'); -ALTER TABLE `perm_role_permission` ENABLE KEYS; -UNLOCK TABLES; -LOCK TABLES `user_info` WRITE; -ALTER TABLE `user_info` DISABLE KEYS; + INSERT INTO `user_info` (`id`, `username`, `password`, `nickname`, `gmt_create`, `gmt_modified`) VALUES (1,'zhangsan','123456','张三','2019-04-27 08:32:57','2019-04-27 08:32:57'); -ALTER TABLE `user_info` ENABLE KEYS; -UNLOCK TABLES; - - - - -SET FOREIGN_KEY_CHECKS = @PREVIOUS_FOREIGN_KEY_CHECKS; diff --git a/sop.sql b/sop.sql index 8d84c47f..181d4c8e 100644 --- a/sop.sql +++ b/sop.sql @@ -1,22 +1,17 @@ -/** -适用于MYSQL 5.6+版本 -**/ + CREATE DATABASE IF NOT EXISTS `sop` DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; USE `sop`; -SET @PREVIOUS_FOREIGN_KEY_CHECKS = @@FOREIGN_KEY_CHECKS; -SET FOREIGN_KEY_CHECKS = 0; - - DROP TABLE IF EXISTS `user_info`; DROP TABLE IF EXISTS `perm_role_permission`; DROP TABLE IF EXISTS `perm_role`; DROP TABLE IF EXISTS `perm_isv_role`; DROP TABLE IF EXISTS `isv_keys`; DROP TABLE IF EXISTS `isv_info`; +DROP TABLE IF EXISTS `config_service_route`; DROP TABLE IF EXISTS `config_route_limit`; DROP TABLE IF EXISTS `config_route_base`; DROP TABLE IF EXISTS `config_limit`; @@ -25,7 +20,6 @@ DROP TABLE IF EXISTS `config_gray_instance`; DROP TABLE IF EXISTS `config_gray`; DROP TABLE IF EXISTS `config_common`; DROP TABLE IF EXISTS `admin_user_info`; -DROP TABLE IF EXISTS `config_service_route`; CREATE TABLE `admin_user_info` ( @@ -138,6 +132,28 @@ CREATE TABLE `config_route_limit` ( ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='路由限流配置'; +CREATE TABLE `config_service_route` ( + `id` varchar(128) NOT NULL DEFAULT '' COMMENT '路由id', + `service_id` varchar(128) NOT NULL DEFAULT '', + `name` varchar(128) NOT NULL DEFAULT '' COMMENT '接口名', + `version` varchar(64) NOT NULL DEFAULT '' COMMENT '版本号', + `predicates` varchar(256) DEFAULT NULL COMMENT '路由断言(SpringCloudGateway专用)', + `filters` varchar(256) DEFAULT NULL COMMENT '路由过滤器(SpringCloudGateway专用)', + `uri` varchar(128) NOT NULL DEFAULT '' COMMENT '路由规则转发的目标uri', + `path` varchar(128) NOT NULL DEFAULT '' COMMENT 'uri后面跟的path', + `order_index` int(11) NOT NULL DEFAULT '0' COMMENT '路由执行的顺序', + `ignore_validate` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否忽略验证,业务参数验证除外', + `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态,0:待审核,1:启用,2:禁用', + `merge_result` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否合并结果', + `permission` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否需要授权才能访问', + `need_token` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否需要token', + `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, + `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`), + KEY `idx_serviceid` (`service_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='路由配置'; + + CREATE TABLE `isv_info` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `app_key` varchar(100) NOT NULL COMMENT 'appKey', @@ -212,84 +228,32 @@ CREATE TABLE `user_info` ( KEY `idx_unamepwd` (`username`,`password`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='用户信息表'; -CREATE TABLE `config_service_route` ( - `id` varchar(128) NOT NULL DEFAULT '' COMMENT '路由id', - `service_id` varchar(128) NOT NULL DEFAULT '', - `name` varchar(128) NOT NULL DEFAULT '' COMMENT '接口名', - `version` varchar(64) NOT NULL DEFAULT '' COMMENT '版本号', - `predicates` varchar(256) DEFAULT NULL COMMENT '路由断言(SpringCloudGateway专用)', - `filters` varchar(256) DEFAULT NULL COMMENT '路由过滤器(SpringCloudGateway专用)', - `uri` varchar(128) NOT NULL DEFAULT '' COMMENT '路由规则转发的目标uri', - `path` varchar(128) NOT NULL DEFAULT '' COMMENT 'uri后面跟的path', - `order_index` int(11) NOT NULL DEFAULT '0' COMMENT '路由执行的顺序', - `ignore_validate` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否忽略验证,业务参数验证除外', - `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态,0:待审核,1:启用,2:禁用', - `merge_result` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否合并结果', - `permission` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否需要授权才能访问', - `need_token` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否需要token', - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `idx_serviceid` (`service_id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='路由配置'; - - -SET FOREIGN_KEY_CHECKS = @PREVIOUS_FOREIGN_KEY_CHECKS; - -SET @PREVIOUS_FOREIGN_KEY_CHECKS = @@FOREIGN_KEY_CHECKS; -SET FOREIGN_KEY_CHECKS = 0; -LOCK TABLES `admin_user_info` WRITE; -ALTER TABLE `admin_user_info` DISABLE KEYS; INSERT INTO `admin_user_info` (`id`, `username`, `password`, `status`, `gmt_create`, `gmt_modified`) VALUES (1,'admin','a62cd510fb9a8a557a27ef279569091f',1,'2019-04-02 19:55:26','2019-04-02 19:55:26'); -ALTER TABLE `admin_user_info` ENABLE KEYS; -UNLOCK TABLES; -LOCK TABLES `config_common` WRITE; -ALTER TABLE `config_common` DISABLE KEYS; -ALTER TABLE `config_common` ENABLE KEYS; -UNLOCK TABLES; -LOCK TABLES `config_gray` WRITE; -ALTER TABLE `config_gray` DISABLE KEYS; -ALTER TABLE `config_gray` ENABLE KEYS; -UNLOCK TABLES; -LOCK TABLES `config_gray_instance` WRITE; -ALTER TABLE `config_gray_instance` DISABLE KEYS; -ALTER TABLE `config_gray_instance` ENABLE KEYS; -UNLOCK TABLES; -LOCK TABLES `config_ip_blacklist` WRITE; -ALTER TABLE `config_ip_blacklist` DISABLE KEYS; -ALTER TABLE `config_ip_blacklist` ENABLE KEYS; -UNLOCK TABLES; -LOCK TABLES `config_limit` WRITE; -ALTER TABLE `config_limit` DISABLE KEYS; -INSERT INTO `config_limit` (`id`, `route_id`, `app_key`, `limit_ip`, `service_id`, `limit_type`, `exec_count_per_second`, `limit_code`, `limit_msg`, `token_bucket_count`, `limit_status`, `order_index`, `remark`, `gmt_create`, `gmt_modified`) VALUES - (1,'alipay.story.get1.0','','192.168.1.1,172.2.2.3','story-service',2,5,'','',6,1,3,NULL,'2019-05-17 19:21:35','2019-05-21 09:12:15'), - (2,'alipay.story.get1.0','2019032617262200001','','story-service',2,5,'service-budy','服务器忙',10,1,0,'','2019-05-17 19:39:30','2019-05-21 15:36:52'), - (3,'alipay.story.find1.0','20190331562013861008375808','','story-service',1,3,'service-busy','服务器忙',5,1,1,NULL,'2019-05-17 20:20:32','2019-05-20 17:40:17'), - (4,'alipay.story.get1.2','','','story-service',1,5,'service-busy','服务器忙',3,1,1,'','2019-05-20 16:27:21','2019-05-21 15:53:10'), - (5,'','20190401562373796095328256','','story-service',1,5,'service-busy','服务器忙',5,1,0,'这个appKey调用很频繁,重点照顾','2019-05-21 15:48:08','2019-05-21 18:45:32'), - (6,'','','10.1.30.54','story-service',1,5,'service-busy','服务器忙',5,1,0,'这个ip在攻击我们','2019-05-21 15:55:33','2019-05-21 18:17:29'), - (7,'story.get1.1','','10.1.30.54','story-service',1,5,'service-busy','服务器忙',5,1,0,NULL,'2019-05-21 16:30:48','2019-05-21 16:30:48'), - (8,'','20190513577548661718777857','10.1.30.54','story-service',1,5,'service-busy','服务器忙',5,1,0,NULL,'2019-05-21 17:10:45','2019-05-21 17:10:52'); -ALTER TABLE `config_limit` ENABLE KEYS; -UNLOCK TABLES; +INSERT INTO `config_limit` (`id`, `route_id`, `app_key`, `limit_ip`, `service_id`, `limit_type`, `exec_count_per_second`, `duration_seconds`, `limit_code`, `limit_msg`, `token_bucket_count`, `limit_status`, `order_index`, `remark`, `gmt_create`, `gmt_modified`) VALUES + (1,'alipay.story.get1.0','','192.168.1.1,172.2.2.3','story-service',2,5,1,'','',6,1,3,NULL,'2019-05-17 19:21:35','2019-05-21 09:12:15'), + (2,'alipay.story.get1.0','2019032617262200001','','story-service',2,5,1,'service-budy','服务器忙',10,1,0,'','2019-05-17 19:39:30','2019-05-21 15:36:52'), + (3,'alipay.story.find1.0','20190331562013861008375808','','story-service',1,3,1,'service-busy','服务器忙',5,1,1,NULL,'2019-05-17 20:20:32','2019-05-20 17:40:17'), + (4,'alipay.story.get1.2','','','story-service',1,5,1,'service-busy','服务器忙',3,1,1,'','2019-05-20 16:27:21','2019-05-21 15:53:10'), + (5,'','20190401562373796095328256','','story-service',1,5,1,'service-busy','服务器忙',5,1,0,'这个appKey调用很频繁,重点照顾','2019-05-21 15:48:08','2019-05-21 18:45:32'), + (6,'','','10.1.30.54','story-service',1,5,1,'service-busy','服务器忙',5,1,0,'这个ip在攻击我们','2019-05-21 15:55:33','2019-05-21 18:17:29'), + (7,'story.get1.1','','10.1.30.54','story-service',1,5,1,'service-busy','服务器忙',5,1,0,NULL,'2019-05-21 16:30:48','2019-05-21 16:30:48'), + (8,'','20190513577548661718777857','10.1.30.54','story-service',1,5,1,'service-busy','服务器忙',5,1,0,NULL,'2019-05-21 17:10:45','2019-05-21 17:10:52'); -LOCK TABLES `config_route_base` WRITE; -ALTER TABLE `config_route_base` DISABLE KEYS; INSERT INTO `config_route_base` (`id`, `route_id`, `status`, `gmt_create`, `gmt_modified`) VALUES (1,'story.get1.1',1,'2019-04-09 19:15:58','2019-04-09 19:16:54'), (2,'alipay.story.get1.0',1,'2019-04-09 19:19:57','2019-04-19 14:45:33'), @@ -299,23 +263,17 @@ INSERT INTO `config_route_base` (`id`, `route_id`, `status`, `gmt_create`, `gmt_ (6,'alipay.category.get1.0',1,'2019-05-06 16:50:39','2019-05-20 17:01:48'), (7,'permission.story.get1.0',1,'2019-05-06 20:03:17','2019-05-06 20:03:21'), (8,'goods.add1.0',1,'2019-05-13 17:23:00','2019-05-13 17:23:11'); -ALTER TABLE `config_route_base` ENABLE KEYS; -UNLOCK TABLES; -LOCK TABLES `config_route_limit` WRITE; -ALTER TABLE `config_route_limit` DISABLE KEYS; INSERT INTO `config_route_limit` (`id`, `route_id`, `service_id`, `limit_type`, `exec_count_per_second`, `limit_code`, `limit_msg`, `token_bucket_count`, `limit_status`, `gmt_create`, `gmt_modified`) VALUES (1,'alipay.story.find1.0','story-service',1,10,'isp.service-busy','服务器正忙',NULL,1,'2019-04-10 20:55:08','2019-04-10 21:04:35'), (2,'alipay.story.get1.0','story-service',2,5,'isp.service-busy','服务器正忙',5,0,'2019-04-10 21:05:51','2019-04-11 18:18:03'), (3,'alipay.story.get1.2','story-service',2,10,'isp.service-busy','服务器正忙',3,1,'2019-04-11 17:26:04','2019-04-11 18:19:33'), (4,'alipay.category.get1.0','story-service',1,5,'error-code','服务器忙',5,1,'2019-05-07 12:22:04','2019-05-07 12:25:06'); -ALTER TABLE `config_route_limit` ENABLE KEYS; -UNLOCK TABLES; -LOCK TABLES `isv_info` WRITE; -ALTER TABLE `isv_info` DISABLE KEYS; + + INSERT INTO `isv_info` (`id`, `app_key`, `status`, `sign_type`, `remark`, `gmt_create`, `gmt_modified`) VALUES (1,'2019032617262200001',1,1,NULL,'2019-03-27 10:10:34','2019-05-09 11:10:38'), (3,'asdfasdf',2,1,NULL,'2019-03-27 11:01:11','2019-05-11 10:45:01'), @@ -327,12 +285,8 @@ INSERT INTO `isv_info` (`id`, `app_key`, `status`, `sign_type`, `remark`, `gmt_c (10,'easyopen_test',1,2,NULL,'2019-04-19 17:19:34','2019-04-19 17:30:09'), (11,'20190513577548661718777856',1,1,NULL,'2019-05-13 17:24:17','2019-05-13 17:24:17'), (12,'20190513577548661718777857',1,1,NULL,'2019-05-13 17:24:17','2019-05-13 17:24:17'); -ALTER TABLE `isv_info` ENABLE KEYS; -UNLOCK TABLES; -LOCK TABLES `isv_keys` WRITE; -ALTER TABLE `isv_keys` DISABLE KEYS; INSERT INTO `isv_keys` (`id`, `app_key`, `sign_type`, `secret`, `key_format`, `public_key_isv`, `private_key_isv`, `public_key_platform`, `private_key_platform`, `gmt_create`, `gmt_modified`) VALUES (1,'2019032617262200001',1,'',1,'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQ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O7hqF0Ood9zTOc+kolgnWJtqX54CoodfABt0SNS/bsr6hCAWu17RGnbgBaK+ZaJD3NVqXVXE8E30cYHiQIDAQAB','MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAM4lMCwagCw0Yl3Npabzfma2lxjZjEavg0+OeFCZ9Ss91P5mCLqOab6iVi7KA14Hxw5IAuZPOBeV5/7pJ3B9ElUQxhUA7uGoXQ6h33NM5z6SiWCdYm2pfngKih18AG3RI1L9uyvqEIBa7XtEaduAFor5lokPc1WpdVcTwTfRxgeJAgMBAAECgYAM3XFGL1k0aQiChiUCaEvJKTgAywLgHm/5dRC5JwKP8knqnn+I9P5QcV0jimPvaFjZ4VCdAvCjOC3EUNSvRn7wR2Lb1+BGZZePTdxtHWE2aqJ1W1SvgQTqMsLlPBRPnXo5XH/ng3WEH15ynd5NR035xAluaI0X/y+PsRxE6TlfIQJBAPSYUyXa2yaEqmvIN+ECKALCLLeDdi2YW3Kjahgz0X9V4Y4aTdrHh8y603zXC0Wy8HeOhwGoyciaS8SmjxCMn4UCQQDXweW8xsUreLH8hfVUtyiY/KgUz+R5foJDNXD7TLE9CDoPSHy09qBe99HyVCZg/gNJH4O+tNr6C4916dYaVk01AkBYZ2HOEc8ZmeOaty/zJHtfm9zbqykgi6upwISNINV8Z4bxfHJdO7bKeVANFBBf7a/aFmqXX/EmjxYJioW03o6dAkEAp7ViXJCtJpNU1pNSFZ2hgvmxtSu7zuyVWKSrw8rjYiuI5eRUe13RXsCHgzQB+Ra5exdyEsUGCaL+yosPD73RmQJBALGuM8EQUcBgrpgpeLZ39Ni1DYXYG9aj+u+ar/UL6kI1mCNFgwroO4EVIvXPVxikMxUgiE2tVaBML5nm8VDNJ7s=','','','2019-08-13 15:18:39','2019-08-13 15:18:39'), @@ -344,12 +298,8 @@ INSERT INTO `isv_keys` (`id`, `app_key`, `sign_type`, `secret`, `key_format`, `p (8,'easyopen_test',2,'G9w0BAQEFAAOCAQ8AMIIBCgKCA',1,'','','','','2019-08-13 15:18:39','2019-08-13 15:18:39'), (9,'20190513577548661718777856',1,'',1,'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCdGjz3IE2VQteDjQaFacXLCAIqdEIIVcf7LW7f142V55Q0xtcjDTOHjBHExZsG64/Y5WKz4oQVWGnXwtrled8Qg0YAA7ueat8mE8NzJSm9txbfU9hwXB77nJxVkFyaSG1p0IZFrNQpbbUxTX9755deP7DdcSF148LLr091V++S3QIDAQAB','MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAJ0aPPcgTZVC14ONBoVpxcsIAip0QghVx/stbt/XjZXnlDTG1yMNM4eMEcTFmwbrj9jlYrPihBVYadfC2uV53xCDRgADu55q3yYTw3MlKb23Ft9T2HBcHvucnFWQXJpIbWnQhkWs1ClttTFNf3vnl14/sN1xIXXjwsuvT3VX75LdAgMBAAECgYB68z/nQDa3q/oykDocS21qujfHtfi/wTKjVylAsdezC+wnab6RRhGf8XUuhGARiGWpn8whcBNjCTC8lVju4vQ5IIx4Hb74vwDDMtNXeqwkLmARLYu2ELibauezSeqom8/J8cR3ho7Hr4VHPTiC8qvePRmu8AvXVQz2T7SOhEjDGQJBAOm8XOivr+atiknLbQhmo508ON3sjoN9VMwK9cmnup+ZPCsurJTHRja0MJQNdOXObUVJ6wJhs1PHWT+vITfXGJ8CQQCsESzxOYTkZaqBUFjbWVf1rSwjOOsylweTuq44YIJkHhwMjHf3kN/UTXbxsBPUGeT7/+2K5UwQ9snUPr0yTBcDAkA0FMezBWqxgNu+g7iA1bYBVCjrskkzHVsmuA56Z4hbBZ71lEnaQOjxSYdFhhYVGsEYXlciSbjWoyXM3e4N7jzLAkB0ejv+H33CTsAZQZalBdnxSQTz4vf0CyDp9BkzuMELnQZHyF79i2i5gqbd/N+vWMgVfq4CtC3F3gnKT54rii6ZAkAMBIvHriT5Zbs1fW+oxBP1rHqdsRvqs1zEyIadvJgKAFwFEisryfdw2mWm3vxQQ22RlOquBiZEDIlyM0z2m9PJ','','','2019-08-13 15:18:39','2019-08-13 15:18:39'), (10,'20190513577548661718777857',1,'',1,'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCdGjz3IE2VQteDjQaFacXLCAIqdEIIVcf7LW7f142V55Q0xtcjDTOHjBHExZsG64/Y5WKz4oQVWGnXwtrled8Qg0YAA7ueat8mE8NzJSm9txbfU9hwXB77nJxVkFyaSG1p0IZFrNQpbbUxTX9755deP7DdcSF148LLr091V++S3QIDAQAB','MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAJ0aPPcgTZVC14ONBoVpxcsIAip0QghVx/stbt/XjZXnlDTG1yMNM4eMEcTFmwbrj9jlYrPihBVYadfC2uV53xCDRgADu55q3yYTw3MlKb23Ft9T2HBcHvucnFWQXJpIbWnQhkWs1ClttTFNf3vnl14/sN1xIXXjwsuvT3VX75LdAgMBAAECgYB68z/nQDa3q/oykDocS21qujfHtfi/wTKjVylAsdezC+wnab6RRhGf8XUuhGARiGWpn8whcBNjCTC8lVju4vQ5IIx4Hb74vwDDMtNXeqwkLmARLYu2ELibauezSeqom8/J8cR3ho7Hr4VHPTiC8qvePRmu8AvXVQz2T7SOhEjDGQJBAOm8XOivr+atiknLbQhmo508ON3sjoN9VMwK9cmnup+ZPCsurJTHRja0MJQNdOXObUVJ6wJhs1PHWT+vITfXGJ8CQQCsESzxOYTkZaqBUFjbWVf1rSwjOOsylweTuq44YIJkHhwMjHf3kN/UTXbxsBPUGeT7/+2K5UwQ9snUPr0yTBcDAkA0FMezBWqxgNu+g7iA1bYBVCjrskkzHVsmuA56Z4hbBZ71lEnaQOjxSYdFhhYVGsEYXlciSbjWoyXM3e4N7jzLAkB0ejv+H33CTsAZQZalBdnxSQTz4vf0CyDp9BkzuMELnQZHyF79i2i5gqbd/N+vWMgVfq4CtC3F3gnKT54rii6ZAkAMBIvHriT5Zbs1fW+oxBP1rHqdsRvqs1zEyIadvJgKAFwFEisryfdw2mWm3vxQQ22RlOquBiZEDIlyM0z2m9PJ','','','2019-08-13 15:18:39','2019-08-13 15:18:39'); -ALTER TABLE `isv_keys` ENABLE KEYS; -UNLOCK TABLES; -LOCK TABLES `perm_isv_role` WRITE; -ALTER TABLE `perm_isv_role` DISABLE KEYS; INSERT INTO `perm_isv_role` (`id`, `isv_id`, `role_code`, `gmt_create`, `gmt_modified`) VALUES (18,5,'normal','2019-03-31 22:07:50','2019-03-31 22:07:50'), (32,7,'normal','2019-04-01 20:27:33','2019-04-01 20:27:33'), @@ -359,37 +309,17 @@ INSERT INTO `perm_isv_role` (`id`, `isv_id`, `role_code`, `gmt_create`, `gmt_mod (52,6,'normal','2019-05-07 18:14:53','2019-05-07 18:14:53'), (57,1,'normal','2019-05-09 11:10:38','2019-05-09 11:10:38'), (58,11,'normal','2019-05-13 17:24:17','2019-05-13 17:24:17'); -ALTER TABLE `perm_isv_role` ENABLE KEYS; -UNLOCK TABLES; -LOCK TABLES `perm_role` WRITE; -ALTER TABLE `perm_role` DISABLE KEYS; INSERT INTO `perm_role` (`id`, `role_code`, `description`, `gmt_create`, `gmt_modified`) VALUES (1,'normal','普通权限','2019-03-29 15:00:10','2019-03-29 15:00:10'), (2,'vip','VIP权限','2019-03-29 15:00:27','2019-03-29 15:00:27'); -ALTER TABLE `perm_role` ENABLE KEYS; -UNLOCK TABLES; -LOCK TABLES `perm_role_permission` WRITE; -ALTER TABLE `perm_role_permission` DISABLE KEYS; INSERT INTO `perm_role_permission` (`id`, `role_code`, `route_id`, `gmt_create`, `gmt_modified`) VALUES (29,'normal','permission.story.get1.0','2019-05-06 18:29:16','2019-05-06 18:29:16'); -ALTER TABLE `perm_role_permission` ENABLE KEYS; -UNLOCK TABLES; -LOCK TABLES `user_info` WRITE; -ALTER TABLE `user_info` DISABLE KEYS; INSERT INTO `user_info` (`id`, `username`, `password`, `nickname`, `gmt_create`, `gmt_modified`) VALUES (1,'zhangsan','123456','张三','2019-04-27 08:32:57','2019-04-27 08:32:57'); -ALTER TABLE `user_info` ENABLE KEYS; -UNLOCK TABLES; - - - - -SET FOREIGN_KEY_CHECKS = @PREVIOUS_FOREIGN_KEY_CHECKS; - From f223a56fd503125452864c5d222ff7c70499ff6b Mon Sep 17 00:00:00 2001 From: tanghc Date: Mon, 24 Aug 2020 12:09:51 +0800 Subject: [PATCH 15/15] 4.0.3 --- doc/docs/files/10092_接口限流.md | 4 +-- .../api/service/param/LimitNewAddParam.java | 4 +-- .../service/param/LimitNewUpdateParam.java | 4 +-- .../api/service/param/LimitParam.java | 4 +-- .../api/service/result/LimitNewVO.java | 4 +-- .../api/service/result/LimitVO.java | 4 +-- .../sop/adminserver/bean/ConfigLimitDto.java | 2 +- .../sop/adminserver/common/LimitEnum.java | 2 +- .../sop/adminserver/entity/ConfigLimit.java | 2 +- .../limit/DefaultLimitManager.java | 2 +- .../sop/gatewaycommon/limit/LimitType.java | 2 +- .../gitee/sop/gateway/entity/ConfigLimit.java | 2 +- .../sop/gateway/entity/ConfigRouteLimit.java | 2 +- sop-mysql5.6以下版本.sql | 15 ++--------- sop.sql | 27 ++----------------- 15 files changed, 23 insertions(+), 57 deletions(-) diff --git a/doc/docs/files/10092_接口限流.md b/doc/docs/files/10092_接口限流.md index 8f1c9ef8..06b9e481 100644 --- a/doc/docs/files/10092_接口限流.md +++ b/doc/docs/files/10092_接口限流.md @@ -2,10 +2,10 @@ SOP提供了简单的接口限流策略: -- 漏桶策略:每秒处理固定数量的请求,超出请求返回错误信息。 +- 窗口策略:每秒处理固定数量的请求,超出请求返回错误信息。 - 令牌桶策略:每秒放置固定数量的令牌数,每个请求进来后先去拿令牌,拿到了令牌才能继续,拿不到则等候令牌重新生成了再拿。 -如果一个接口设置了漏桶策略,假设接口每秒可处理5个请求,一秒内同时有6个请求进来,前5个接口是能够访问的,第六个请求将返回错误信息。 +如果一个接口设置了窗口策略,假设接口每秒可处理5个请求,一秒内同时有6个请求进来,前5个接口是能够访问的,第六个请求将返回错误信息。 如果设置了令牌桶策略,桶的容量是5,那么每秒中生成5个令牌,同一时间有6个请求进来,那么前5个能成功拿到令牌继续,第六个则等待,令牌重新生成了再拿。 diff --git a/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/api/service/param/LimitNewAddParam.java b/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/api/service/param/LimitNewAddParam.java index 470de1e4..e686edd6 100644 --- a/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/api/service/param/LimitNewAddParam.java +++ b/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/api/service/param/LimitNewAddParam.java @@ -30,8 +30,8 @@ public class LimitNewAddParam { @NotBlank(message = "serviceId can not null") private String serviceId; - /** 限流策略,1:漏桶策略,2:令牌桶策略, 数据库字段:limit_type */ - @ApiDocField(description = "限流策略,1:漏桶策略,2:令牌桶策略") + /** 限流策略,1:窗口策略,2:令牌桶策略, 数据库字段:limit_type */ + @ApiDocField(description = "限流策略,1:窗口策略,2:令牌桶策略") @NotNull(message = "limitType不能为空") private Byte limitType; diff --git a/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/api/service/param/LimitNewUpdateParam.java b/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/api/service/param/LimitNewUpdateParam.java index 5f4902fa..5b326e69 100644 --- a/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/api/service/param/LimitNewUpdateParam.java +++ b/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/api/service/param/LimitNewUpdateParam.java @@ -35,8 +35,8 @@ public class LimitNewUpdateParam { @NotBlank(message = "serviceId can not null") private String serviceId; - /** 限流策略,1:漏桶策略,2:令牌桶策略, 数据库字段:limit_type */ - @ApiDocField(description = "限流策略,1:漏桶策略,2:令牌桶策略") + /** 限流策略,1:窗口策略,2:令牌桶策略, 数据库字段:limit_type */ + @ApiDocField(description = "限流策略,1:窗口策略,2:令牌桶策略") @NotNull(message = "limitType不能为空") private Byte limitType; diff --git a/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/api/service/param/LimitParam.java b/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/api/service/param/LimitParam.java index c2e36a52..dbd5172e 100644 --- a/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/api/service/param/LimitParam.java +++ b/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/api/service/param/LimitParam.java @@ -20,8 +20,8 @@ public class LimitParam { @NotBlank(message = "serviceId can not null") private String serviceId; - /** 限流策略,1:漏桶策略,2:令牌桶策略, 数据库字段:limit_type */ - @ApiDocField(description = "限流策略,1:漏桶策略,2:令牌桶策略") + /** 限流策略,1:窗口策略,2:令牌桶策略, 数据库字段:limit_type */ + @ApiDocField(description = "限流策略,1:窗口策略,2:令牌桶策略") @NotNull private Byte limitType; diff --git a/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/api/service/result/LimitNewVO.java b/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/api/service/result/LimitNewVO.java index 1ec2c6b9..58c2de38 100644 --- a/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/api/service/result/LimitNewVO.java +++ b/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/api/service/result/LimitNewVO.java @@ -41,9 +41,9 @@ public class LimitNewVO { private String serviceId; /** - * 限流策略,1:漏桶策略,2:令牌桶策略, 数据库字段:limit_type + * 限流策略,1:窗口策略,2:令牌桶策略, 数据库字段:limit_type */ - @ApiDocField(description = "限流策略,1:漏桶策略,2:令牌桶策略") + @ApiDocField(description = "限流策略,1:窗口策略,2:令牌桶策略") private Byte limitType; /** diff --git a/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/api/service/result/LimitVO.java b/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/api/service/result/LimitVO.java index 166f72cc..afcb218d 100644 --- a/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/api/service/result/LimitVO.java +++ b/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/api/service/result/LimitVO.java @@ -32,9 +32,9 @@ public class LimitVO { private String serviceId; /** - * 限流策略,1:漏桶策略,2:令牌桶策略, 数据库字段:limit_type + * 限流策略,1:窗口策略,2:令牌桶策略, 数据库字段:limit_type */ - @ApiDocField(description = "限流策略,1:漏桶策略,2:令牌桶策略") + @ApiDocField(description = "限流策略,1:窗口策略,2:令牌桶策略") private Byte limitType; /** diff --git a/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/bean/ConfigLimitDto.java b/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/bean/ConfigLimitDto.java index 701c9622..94d646bf 100644 --- a/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/bean/ConfigLimitDto.java +++ b/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/bean/ConfigLimitDto.java @@ -21,7 +21,7 @@ public class ConfigLimitDto { /** 服务id, 数据库字段:service_id */ private String serviceId; - /** 限流策略,1:漏桶策略,2:令牌桶策略, 数据库字段:limit_type */ + /** 限流策略,1:窗口策略,2:令牌桶策略, 数据库字段:limit_type */ private Byte limitType; /** 每秒可处理请求数, 数据库字段:exec_count_per_second */ diff --git a/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/common/LimitEnum.java b/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/common/LimitEnum.java index e516dbf9..1dc2048f 100644 --- a/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/common/LimitEnum.java +++ b/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/common/LimitEnum.java @@ -6,7 +6,7 @@ package com.gitee.sop.adminserver.common; */ public enum LimitEnum { /** - * 限流策略,1:漏桶策略 + * 限流策略,1:窗口策略 */ TYPE_LEAKY_BUCKET((byte) 1), /** diff --git a/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/entity/ConfigLimit.java b/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/entity/ConfigLimit.java index d14fa006..0a7b60f0 100644 --- a/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/entity/ConfigLimit.java +++ b/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/entity/ConfigLimit.java @@ -37,7 +37,7 @@ public class ConfigLimit { /** 服务id, 数据库字段:service_id */ private String serviceId; - /** 限流策略,1:漏桶策略,2:令牌桶策略, 数据库字段:limit_type */ + /** 限流策略,1:窗口策略,2:令牌桶策略, 数据库字段:limit_type */ private Byte limitType; /** 每秒可处理请求数, 数据库字段:exec_count_per_second */ 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 a7f78048..e79b32da 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 @@ -39,7 +39,7 @@ public class DefaultLimitManager implements LimitManager { // 被限流了 return counter.get(routeConfig.getId()).incrementAndGet() <= execCountPerSecond; } catch (ExecutionException e) { - log.error("漏桶限流出错,routeConfig:{}", routeConfig, e); + log.error("窗口限流出错,routeConfig:{}", routeConfig, e); return false; } } diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/limit/LimitType.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/limit/LimitType.java index 66da4379..2837a998 100644 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/limit/LimitType.java +++ b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/limit/LimitType.java @@ -7,7 +7,7 @@ package com.gitee.sop.gatewaycommon.limit; */ public enum LimitType { /** - * 漏桶策略。每秒处理固定数量的请求,超出请求返回错误信息。 + * 窗口策略。每秒处理固定数量的请求,超出请求返回错误信息。 */ LEAKY_BUCKET(1), /** diff --git a/sop-gateway/src/main/java/com/gitee/sop/gateway/entity/ConfigLimit.java b/sop-gateway/src/main/java/com/gitee/sop/gateway/entity/ConfigLimit.java index 43cd1cdc..30bd01c4 100644 --- a/sop-gateway/src/main/java/com/gitee/sop/gateway/entity/ConfigLimit.java +++ b/sop-gateway/src/main/java/com/gitee/sop/gateway/entity/ConfigLimit.java @@ -38,7 +38,7 @@ public class ConfigLimit { /** 服务id, 数据库字段:service_id */ private String serviceId; - /** 限流策略,1:漏桶策略,2:令牌桶策略, 数据库字段:limit_type */ + /** 限流策略,1:窗口策略,2:令牌桶策略, 数据库字段:limit_type */ private Byte limitType; /** 每秒可处理请求数, 数据库字段:exec_count_per_second */ diff --git a/sop-gateway/src/main/java/com/gitee/sop/gateway/entity/ConfigRouteLimit.java b/sop-gateway/src/main/java/com/gitee/sop/gateway/entity/ConfigRouteLimit.java index da4584e5..cd52de97 100644 --- a/sop-gateway/src/main/java/com/gitee/sop/gateway/entity/ConfigRouteLimit.java +++ b/sop-gateway/src/main/java/com/gitee/sop/gateway/entity/ConfigRouteLimit.java @@ -28,7 +28,7 @@ public class ConfigRouteLimit { /** 路由id, 数据库字段:route_id */ private String routeId; - /** 限流策略,1:漏桶策略,2:令牌桶策略, 数据库字段:limit_type */ + /** 限流策略,1:窗口策略,2:令牌桶策略, 数据库字段:limit_type */ private Byte limitType; /** 每秒可处理请求数, 数据库字段:exec_count_per_second */ diff --git a/sop-mysql5.6以下版本.sql b/sop-mysql5.6以下版本.sql index 66d3cf3a..4b8694d9 100644 --- a/sop-mysql5.6以下版本.sql +++ b/sop-mysql5.6以下版本.sql @@ -87,7 +87,7 @@ CREATE TABLE `config_limit` ( `app_key` VARCHAR(128) DEFAULT NULL, `limit_ip` VARCHAR(300) DEFAULT NULL COMMENT '限流ip,多个用英文逗号隔开', `service_id` VARCHAR(64) NOT NULL DEFAULT '' COMMENT '服务id', - `limit_type` TINYINT(4) NOT NULL DEFAULT '1' COMMENT '限流策略,1:漏桶策略,2:令牌桶策略', + `limit_type` TINYINT(4) NOT NULL DEFAULT '1' COMMENT '限流策略,1:窗口策略,2:令牌桶策略', `exec_count_per_second` INT(11) DEFAULT NULL COMMENT '每秒可处理请求数', `duration_seconds` INT(11) NOT NULL DEFAULT '1' COMMENT '限流持续时间,默认1秒,即每durationSeconds秒允许多少请求(当limit_type=1时有效)', `limit_code` VARCHAR(64) DEFAULT NULL COMMENT '返回的错误码', @@ -117,7 +117,7 @@ CREATE TABLE `config_route_limit` ( `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `route_id` VARCHAR(64) NOT NULL COMMENT '路由id', `service_id` VARCHAR(64) NOT NULL DEFAULT '', - `limit_type` TINYINT(4) NOT NULL DEFAULT '1' COMMENT '限流策略,1:漏桶策略,2:令牌桶策略', + `limit_type` TINYINT(4) NOT NULL DEFAULT '1' COMMENT '限流策略,1:窗口策略,2:令牌桶策略', `exec_count_per_second` INT(11) DEFAULT NULL COMMENT '每秒可处理请求数', `limit_code` VARCHAR(64) DEFAULT NULL COMMENT '返回的错误码', `limit_msg` VARCHAR(100) DEFAULT NULL COMMENT '返回的错误信息', @@ -231,17 +231,6 @@ INSERT INTO `admin_user_info` (`id`, `username`, `password`, `status`, `gmt_crea ALTER TABLE `admin_user_info` ENABLE KEYS; -INSERT INTO `config_limit` (`id`, `route_id`, `app_key`, `limit_ip`, `service_id`, `limit_type`, `exec_count_per_second`, `limit_code`, `limit_msg`, `token_bucket_count`, `limit_status`, `order_index`, `remark`, `gmt_create`, `gmt_modified`) VALUES - (1,'alipay.story.get1.0','','192.168.1.1,172.2.2.3','story-service',2,5,'','',6,1,3,NULL,'2019-05-17 19:21:35','2019-05-21 09:12:15'), - (2,'alipay.story.get1.0','2019032617262200001','','story-service',2,5,'service-budy','服务器忙',10,1,0,'','2019-05-17 19:39:30','2019-05-21 15:36:52'), - (3,'alipay.story.find1.0','20190331562013861008375808','','story-service',1,3,'service-busy','服务器忙',5,1,1,NULL,'2019-05-17 20:20:32','2019-05-20 17:40:17'), - (4,'alipay.story.get1.2','','','story-service',1,5,'service-busy','服务器忙',3,1,1,'','2019-05-20 16:27:21','2019-05-21 15:53:10'), - (5,'','20190401562373796095328256','','story-service',1,5,'service-busy','服务器忙',5,1,0,'这个appKey调用很频繁,重点照顾','2019-05-21 15:48:08','2019-05-21 18:45:32'), - (6,'','','10.1.30.54','story-service',1,5,'service-busy','服务器忙',5,1,0,'这个ip在攻击我们','2019-05-21 15:55:33','2019-05-21 18:17:29'), - (7,'story.get1.1','','10.1.30.54','story-service',1,5,'service-busy','服务器忙',5,1,0,NULL,'2019-05-21 16:30:48','2019-05-21 16:30:48'), - (8,'','20190513577548661718777857','10.1.30.54','story-service',1,5,'service-busy','服务器忙',5,1,0,NULL,'2019-05-21 17:10:45','2019-05-21 17:10:52'); - - INSERT INTO `config_route_base` (`id`, `route_id`, `status`, `gmt_create`, `gmt_modified`) VALUES (1,'story.get1.1',1,'2019-04-09 19:15:58','2019-04-09 19:16:54'), (2,'alipay.story.get1.0',1,'2019-04-09 19:19:57','2019-04-19 14:45:33'), diff --git a/sop.sql b/sop.sql index 181d4c8e..2f850206 100644 --- a/sop.sql +++ b/sop.sql @@ -89,7 +89,7 @@ CREATE TABLE `config_limit` ( `app_key` varchar(128) DEFAULT NULL, `limit_ip` varchar(300) DEFAULT NULL COMMENT '限流ip,多个用英文逗号隔开', `service_id` varchar(64) NOT NULL DEFAULT '' COMMENT '服务id', - `limit_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '限流策略,1:漏桶策略,2:令牌桶策略', + `limit_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '限流策略,1:窗口策略,2:令牌桶策略', `exec_count_per_second` int(11) DEFAULT NULL COMMENT '每秒可处理请求数', `duration_seconds` int(11) NOT NULL DEFAULT '1' COMMENT '限流持续时间,默认1秒,即每durationSeconds秒允许多少请求(当limit_type=1时有效)', `limit_code` varchar(64) DEFAULT NULL COMMENT '返回的错误码', @@ -119,7 +119,7 @@ CREATE TABLE `config_route_limit` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `route_id` varchar(64) NOT NULL COMMENT '路由id', `service_id` varchar(64) NOT NULL DEFAULT '', - `limit_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '限流策略,1:漏桶策略,2:令牌桶策略', + `limit_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '限流策略,1:窗口策略,2:令牌桶策略', `exec_count_per_second` int(11) DEFAULT NULL COMMENT '每秒可处理请求数', `limit_code` varchar(64) DEFAULT NULL COMMENT '返回的错误码', `limit_msg` varchar(100) DEFAULT NULL COMMENT '返回的错误信息', @@ -229,31 +229,10 @@ CREATE TABLE `user_info` ( ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='用户信息表'; - - INSERT INTO `admin_user_info` (`id`, `username`, `password`, `status`, `gmt_create`, `gmt_modified`) VALUES (1,'admin','a62cd510fb9a8a557a27ef279569091f',1,'2019-04-02 19:55:26','2019-04-02 19:55:26'); - - - - - - - - -INSERT INTO `config_limit` (`id`, `route_id`, `app_key`, `limit_ip`, `service_id`, `limit_type`, `exec_count_per_second`, `duration_seconds`, `limit_code`, `limit_msg`, `token_bucket_count`, `limit_status`, `order_index`, `remark`, `gmt_create`, `gmt_modified`) VALUES - (1,'alipay.story.get1.0','','192.168.1.1,172.2.2.3','story-service',2,5,1,'','',6,1,3,NULL,'2019-05-17 19:21:35','2019-05-21 09:12:15'), - (2,'alipay.story.get1.0','2019032617262200001','','story-service',2,5,1,'service-budy','服务器忙',10,1,0,'','2019-05-17 19:39:30','2019-05-21 15:36:52'), - (3,'alipay.story.find1.0','20190331562013861008375808','','story-service',1,3,1,'service-busy','服务器忙',5,1,1,NULL,'2019-05-17 20:20:32','2019-05-20 17:40:17'), - (4,'alipay.story.get1.2','','','story-service',1,5,1,'service-busy','服务器忙',3,1,1,'','2019-05-20 16:27:21','2019-05-21 15:53:10'), - (5,'','20190401562373796095328256','','story-service',1,5,1,'service-busy','服务器忙',5,1,0,'这个appKey调用很频繁,重点照顾','2019-05-21 15:48:08','2019-05-21 18:45:32'), - (6,'','','10.1.30.54','story-service',1,5,1,'service-busy','服务器忙',5,1,0,'这个ip在攻击我们','2019-05-21 15:55:33','2019-05-21 18:17:29'), - (7,'story.get1.1','','10.1.30.54','story-service',1,5,1,'service-busy','服务器忙',5,1,0,NULL,'2019-05-21 16:30:48','2019-05-21 16:30:48'), - (8,'','20190513577548661718777857','10.1.30.54','story-service',1,5,1,'service-busy','服务器忙',5,1,0,NULL,'2019-05-21 17:10:45','2019-05-21 17:10:52'); - - INSERT INTO `config_route_base` (`id`, `route_id`, `status`, `gmt_create`, `gmt_modified`) VALUES (1,'story.get1.1',1,'2019-04-09 19:15:58','2019-04-09 19:16:54'), (2,'alipay.story.get1.0',1,'2019-04-09 19:19:57','2019-04-19 14:45:33'), @@ -272,8 +251,6 @@ INSERT INTO `config_route_limit` (`id`, `route_id`, `service_id`, `limit_type`, (4,'alipay.category.get1.0','story-service',1,5,'error-code','服务器忙',5,1,'2019-05-07 12:22:04','2019-05-07 12:25:06'); - - INSERT INTO `isv_info` (`id`, `app_key`, `status`, `sign_type`, `remark`, `gmt_create`, `gmt_modified`) VALUES (1,'2019032617262200001',1,1,NULL,'2019-03-27 10:10:34','2019-05-09 11:10:38'), (3,'asdfasdf',2,1,NULL,'2019-03-27 11:01:11','2019-05-11 10:45:01'),