上一篇 <<<Gateway的谓词配置实例
下一篇 >>>Hystrix功能介绍
1.网关配置类说明

a.GatewayClassPathWarningAutoConfiguration 作用检查是否配置我们webflux依赖。
b.GatewayAutoConfiguration 加载了我们Gateway需要注入的类。
c.GatewayLoadBalancerClientAutoConfiguration 网关需要使用的负载均衡
Lb//jarye-member// 根据服务名称查找真实地址
d.GatewayRedisAutoConfiguration 网关整合Redis整合Lua实现限流
e.GatewayDiscoveryClientAutoConfiguration 服务注册与发现功能
2.网关流程分析

a.客户端向网关发送Http请求,会到达DispatcherHandler接受请求,匹配到RoutePredicateHandlerMapping。
b.根据RoutePredicateHandlerMapping匹配到具体的路由策略。
c.FilteringWebHandler获取的路由的GatewayFilter数组,创建GatewayFilterChain处理过滤请求
d.执行我们的代理业务逻辑访问。

过滤器默认有8种,采用责任链模式关联着。

推荐阅读:
<<<网关背景分类及常用框架
<<<微服务网关与过滤器的区别
<<<Nginx与Zuul的区别
<<<Zuul与Gateway有哪些区别
<<<Nginx与网关的区别
<<<如何保证微服务接口的安全
<<<Gateway网关转发demo
<<<Zuul的反向代理、过滤及动态网关配置实例
<<<Gateway高可用集群与动态网关
<<<Gateway的谓词配置实例
网友评论