spring5_demo

yufeng0528 08c452a224 swagger整合 4 years ago
spring5-admin bb1fc28f29 jwt 密钥校验 4 years ago
spring5-auth ce69c3a42c web和webflux冲突 4 years ago
spring5-common 4ccfdce439 加上web 4 years ago
spring5-gateway 08c452a224 swagger整合 4 years ago
spring5-order 8326f9ee73 微服务之间jwt校验 4 years ago
.gitignore baa8aff7da 多层结构 4 years ago
README.md 2345f4c40c 单元测试 5 years ago
pom.xml ce69c3a42c web和webflux冲突 4 years ago

README.md

spring5_demo1

spring5_demo

spring5 -> webflux ->spring gateway

版本

  • 2.2.* -> Hoxton
  • 2.1.* -> Greenwich
  • 2.0.* -> Finchley

路由配置参考

  1. https://www.jianshu.com/p/86660b8b24c4
  2. https://www.jdon.com/51642

gateway filter

  1. AddRequestHeader 添加header给下流接口
  2. AddRequestParameter
  3. AddResponseHeader
  4. DedupeResponseHeader 剔除重复的响应头
  5. Hystrix 未来,Hystrix会被Spring Cloud移除掉,取而代之的是Alibaba Sentinel/Resilience4J
  6. PrefixPath 为匹配的路由添加前缀
  7. PreserveHostHeader
  8. RequestRateLimiter
  9. RedirectTo
  10. RemoveRequestHeader
  11. RemoveResponseHeader
  12. RewritePath
  13. RewriteResponseHeader
  14. SaveSession
  15. RequestSize 为后端服务设置收到的最大请求包大小
  16. CircuitBreaker
  17. ...

全局过滤器

  1. ReactiveLoadBalancerClientFilter
  2. Gateway Metrics

单元测试

  1. wiremock
  2. https://www.infoq.com/articles/stubbing-mocking-service-virtualization-differences

其他

  1. spring.cloud.gateway.discovery.locator.enabled=true
  2. actuator 配置