如何忽略 zuul 中的路由?
How to ignore a route in zuul?
我有一个 spring 应用程序,我在其中使用 zuul 进行路由。我的路由配置是这样的:
zuul:
routes:
core:
path: /core/**
url: http://localhost:3002
ui:
path: /**
url: http://localhost:3003
现在我在我的应用程序中定义了一个休息控制器,它应该在其路由旁边提供验证码服务。所以我用了 ignored-services: /captcha/**
甚至 ignored-patterns: /captcha/**
但它不起作用,对验证码的请求被路由到 ui
路径。
我使用的zuul版本是:org.springframework.cloud:spring-cloud-starter-zuul:1.0.3.RELEASE
它的 ignoredPatterns 而不是 ignored-pattern
zuul:
ignoredPatterns:
- ...........
routes:
core:
path: /core/**
url: http://localhost:3002
ui:
path: /**
url: http://localhost:3003
我有一个 spring 应用程序,我在其中使用 zuul 进行路由。我的路由配置是这样的:
zuul:
routes:
core:
path: /core/**
url: http://localhost:3002
ui:
path: /**
url: http://localhost:3003
现在我在我的应用程序中定义了一个休息控制器,它应该在其路由旁边提供验证码服务。所以我用了 ignored-services: /captcha/**
甚至 ignored-patterns: /captcha/**
但它不起作用,对验证码的请求被路由到 ui
路径。
我使用的zuul版本是:org.springframework.cloud:spring-cloud-starter-zuul:1.0.3.RELEASE
它的 ignoredPatterns 而不是 ignored-pattern
zuul:
ignoredPatterns:
- ...........
routes:
core:
path: /core/**
url: http://localhost:3002
ui:
path: /**
url: http://localhost:3003