【发布时间】:2019-03-15 00:36:30
【问题描述】:
总结: ZUUL 没有为输入路径选择正确的目标 url,因为它没有对输入路径进行严格匹配。
以下是我的zuul路线:
zuul:
routes:
auth:
path: /v1/txn/**
url: http://localhost:8900/v1/cardhostauth
cardproduct:
path: /v1/customer/card/product/**
url: http://localhost:8800/v1/customer/card/product
cardcomposite:
path: /v1/customer/**
url: http://localhost:8400/v1/composite
对于输入路径:“/v1/customer/card/product/”,应选择-http://localhost:8800/v1/customer/card/product,但它选择http://localhost:8400/v1/composite。我的期望是路径模式匹配按指定的顺序发生并且更严格,但似乎它不起作用。
当您为相似的输入路径定义了多个路由时,您能否告诉我 ZUUL 的工作原理?
谢谢
P.S - 当我在 AWS 中通过 Docker 运行时,我可以看到这个问题,但是当我从 eclipse 运行时,这个问题没有出现。 zuul路由的顺序是否取决于spring zuul jar(spring-cloud-starter-netflix-zuul - 2.0.0.RELEASE vs 2.0.1.RELEASE)
【问题讨论】: