Disable per route response timeout with negative number (#2420)

* Disable per route response timeout with negative number

* Formatting
This commit is contained in:
Robert McNees
2021-11-05 17:04:16 -04:00
committed by spencergibb
parent 514c4d7c40
commit 9efafe8d9c
6 changed files with 116 additions and 41 deletions

View File

@@ -2221,6 +2221,19 @@ import static org.springframework.cloud.gateway.support.RouteMetadataUtils.RESPO
}
----
A per-route `response-timeout` with a negative value will disable the global `response-timeout` value.
----
- id: per_route_timeouts
uri: https://example.org
predicates:
- name: Path
args:
pattern: /delay/{timeout}
metadata:
response-timeout: -1
----
=== Fluent Java Routes API
To allow for simple configuration in Java, the `RouteLocatorBuilder` bean includes a fluent API.