一、Spring Cloud Gateway内置Predicate
Spring Cloud Gateway
匹配路由作为 Spring WebFluxHandlerMapping
基础设施的一部分。Spring Cloud Gateway
包含许多内置的Predicate
。所有这些Predicate
都匹配 HTTP
请求的不同属性。您可以将多个Predicate
与逻辑and
语句结合起来使用。
内置断言工厂官方文档:https://docs.spring.io/spring-cloud-gateway/docs/current/reference/html/#gateway-request-predicates-factories
1.1 基于Datetime类型的断言工厂
此类型的断言根据时间做判断,主要有三个:
AfterRoutePredicateFactory<