Adds support for multiple HTTP methods in MethodRoutePredicate

Fixes gh-1473
This commit is contained in:
Dennis Menge
2019-12-13 12:22:05 +01:00
committed by Spencer Gibb
parent c9d3adae12
commit 73bebc9962
4 changed files with 108 additions and 20 deletions

View File

@@ -165,7 +165,7 @@ This predicate extracts the URI template variables (like `sub` defined in the ex
=== Method Route Predicate Factory
The Method Route Predicate Factory takes one parameter: the HTTP method to match.
The Method Route Predicate Factory takes one or more parameters: the HTTP methods to match.
.application.yml
[source,yaml]
@@ -177,10 +177,10 @@ spring:
- id: method_route
uri: https://example.org
predicates:
- Method=GET
- Method=GET,POST
----
This route would match if the request method was a `GET`.
This route would match if the request method was a `GET` or a `POST`.
=== Path Route Predicate Factory
The Path Route Predicate Factory takes two parameter: a list of Spring `PathMatcher` patterns and an optional flag to `matchOptionalTrailingSeparator`.