【发布时间】:2019-09-19 07:58:03
【问题描述】:
如何实现根据请求参数改变servciceId??
下面是我们的 Zuul 配置
zuul:
host:
connect-timeout-millis: 200000
connection-request-timeout-millis: 200000
socket-timeout-millis: 200000
ignored-services: "*"
routes:
route-1:
path: /path1/**
serviceId: ServiceA
route-2:
path: /path2/**
serviceId: ServiceB
这里我们根据 path1/path2 选择 serviceId。
如果 http://localhost:8050/path1/endpointPath?requestParam=ParamValue1 这应该调用 serviceA
如果 http://localhost:8050/path1/endpointPath?requestParam=ParamValue2 这应该调用 serviceB
【问题讨论】:
标签: netflix-eureka netflix-zuul