spring5_demo

yufeng0528 73a62b0ff5 数据库验证服务是否允许访问 4 years ago
spring5-admin e1f7ebef1f jwt编码后校验 4 years ago
spring5-auth 73a62b0ff5 数据库验证服务是否允许访问 4 years ago
spring5-common 73a62b0ff5 数据库验证服务是否允许访问 4 years ago
spring5-gateway 21a8adacea 用github做oauth2认证 4 years ago
spring5-order d003f8fde4 IgnoreClientToken注解 4 years ago
.gitignore baa8aff7da 多层结构 4 years ago
README.md 2345f4c40c 单元测试 5 years ago
pom.xml d21cccdf2b 简单校验 不通过抛出异常 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 配置