This commit is contained in:
tanghc
2019-07-10 11:56:47 +08:00
parent 5a71430a13
commit c20cbd2c0e
5 changed files with 48 additions and 32 deletions

View File

@@ -49,3 +49,13 @@ member.register.total.get 会员服务.注册模块.注册总数.获取
![SOP架构图](https://images.gitee.com/uploads/images/2019/0309/093312_8afb4789_332975.png "sop.png")
- 完整请求路线
```
客户端生成签名串 → 客户端发送请求 →【网关签名校验 → 权限校验 → 限流处理 → 路由转发】→ {微服务端业务参数校验 → 处理业务逻辑 → 微服务端返回结果}
客户端业务处理 ← 客户端验证服务端签名 ← 客户端收到结果 ← -------------【网关返回最终结果 ← 生成服务端签名 ← 网关处理结果】← 结果返回到网关
【】:表示网关处理
{}:表示微服务端处理
```

View File

@@ -1,6 +1,6 @@
# 使用SpringCloudGateway
SOP默认网关是使用Spring Cloud Zuul您也可以切换成Spring Cloud Gateway。
SOP默认网关是使用Spring Cloud Zuul您也可以切换成Spring Cloud Gateway,完整代码见`SpringCloudGateway`分支
**注:**SOP对Spring Cloud Gateway的支持目前处于beta阶段推荐使用zuul。
@@ -60,14 +60,14 @@ public class SopGatewayApplication {
```java
//@Configuration
public class ZuulConfig extends AlipayZuulConfiguration {
public class ZuulConfig extends AlipayZuulConfiguration {...}
```
- 启用GatewayConfig类打开@Configuration注释
```java
@Configuration
public class GatewayConfig extends AlipayGatewayConfiguration
public class GatewayConfig extends AlipayGatewayConfiguration {...}
```
修改完毕重启sop-gateway