官方文档:Spring Cloud Gateway
内置过滤器工厂
AddRequestHeaderGatewayFilterFactory
为请求添加Header Header的名称及值
配置说明
server:
port: 8088
spring:
application:
name: api-gateway
cloud:
nacos:
discovery:
server-addr: 127.0.0.1:8847
username: nacos
password: nacos
gateway:
routes:
- id: order_route # 路由唯一标识
#uri: http://localhost:8020 # 需要转发的地址
uri: lb://order-service # 需要转发的地址
# 断言规则 用于路由规则的匹配
predicates:
# - Path=/order-serv/**
# - After=2024-01-01T23:00:11.518+08:00[Asia/Shanghai]
# - Before=2025-01-01T23:00:11.518+08:00[Asia/Shanghai]
- Betwee
标签:网关,00,Shanghai,nacos,Asia,Gateway,过滤器,server,order
From: https://blog.csdn.net/u012516524/article/details/139389150