springcloud微服务学习笔记(四十八):GateWay常用的Predicate

springcloud微服务学习笔记目录:
springcloud微服务学习笔记

Route Predicate Factories是什么
Spring Cloud Gateway将路由匹配作为Spring WebFlux HandlerMapping基础架构的一部分。

Spring Cloud Gateway包括许多内置的Route Predicate工厂。所有这些Predicate都与HTTP请求的不同属性匹配。 多个Route Predicate工厂可以进行组合Spring Cloud Gateway创建Route对象时,使用RoutePredicateFactory创建Predicate对象, Predicate对象可以赋值给Route。Spring Cloud Gateway包含许多内置的Route Predicate Factories.

所有这些谓词都匹配HTTP请求的不同属性。多种谓词工厂可以组合,并通过逻辑and.

常用的Route Predicate

  1. After Route Predicate
  2. Before Route Predicate
  3. Between Route Predicate
  4. Cookie Route Predicate
  5. Header Route Predicate
  6. Host Route Predicate
  7. Method Route Predicate
  8. Path Route Predicate
  9. Query Route Predicate
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值