0%

参数配置

配置参数说明

1. id

2. path

说明

匹配拦截url

3. serviceId

说明

需要配置 eureka , serviceId 为已注册的某一服务name。

4. url

说明

可以不需要配置 eureka , 直接重定向或者跳转到指定的 url 中,前缀的处理方式参考 stripPrefix

5. stripPrefix

path 匹配是否保留path拦截部分,默认为true。true 不保留,false 保留。

1
2
3
4
5
6
7
8
9
10
zuul:
ignoredServices: '*'
host:
connect-timeout-millis: 20000
socket-timeout-millis: 20000
routes:
cache-service:
path: /cache/**
serviceId: data-cache-service
stripPrefix: false

说明
stripPrefix 为true,请求url http://localhost:8000/cache/index ,会实际跳转到微服务data-cache-service 中的 url为/index 的方法中。
stripPrefix 为false,请求url http://localhost:8000/cache/index ,会实际跳转到微服务data-cache-service 中的 url为/cache/index 的方法中。

6. retryable

7. sensitiveHeaders

8. customSensitiveHeaders