【发布时间】:2019-11-07 11:12:08
【问题描述】:
这是我的 Zuul 配置(.yml 文件)
server:
port: 8080
zuul:
sensitiveHeaders:
ignored-services: "*"
routes:
ui-service:
path: /online-book-store/**
serviceId: ui-service-v1
stripPrefix: true
auth-service:
path: /auth/**
serviceId: auth-service
book-service:
path: /book-service/**
serviceId: book-service
book-service-genres:
path: /api/genres/**
serviceId: book-service
host:
socket-timeout-millis: 10000
connect-timeout-millis: 10000
eureka:
client:
serviceUrl:
defaultZone: http://localhost:2580/eureka/
我面临的问题是,当我发送请求时:
<zuul_gateway>/api/genres/listAll
该请求被转发到
<book-service>/listall,我希望它是<book-service>/api/genres/listAll
所以所有“匹配”的路径都被删除了。如何禁用此“功能” .
【问题讨论】:
标签: spring routing netflix-zuul