spring5_demo1
spring5_demo
spring5 -> webflux ->spring gateway
版本
- 2.2.* -> Hoxton
- 2.1.* -> Greenwich
- 2.0.* -> Finchley
路由配置参考
- https://www.jianshu.com/p/86660b8b24c4
- https://www.jdon.com/51642
gateway filter
- AddRequestHeader 添加header给下流接口
- AddRequestParameter
- AddResponseHeader
- DedupeResponseHeader 剔除重复的响应头
- Hystrix 未来,Hystrix会被Spring Cloud移除掉,取而代之的是Alibaba Sentinel/Resilience4J
- PrefixPath 为匹配的路由添加前缀
- PreserveHostHeader
- RequestRateLimiter
- RedirectTo
- RemoveRequestHeader
- RemoveResponseHeader
- RewritePath
- RewriteResponseHeader
- SaveSession
- RequestSize 为后端服务设置收到的最大请求包大小
- CircuitBreaker
- ...
全局过滤器
- ReactiveLoadBalancerClientFilter
- Gateway Metrics
单元测试
- wiremock
- https://www.infoq.com/articles/stubbing-mocking-service-virtualization-differences
其他
- spring.cloud.gateway.discovery.locator.enabled=true
- actuator 配置