Polishing (backported from main)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2023 the original author or authors.
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -106,6 +106,7 @@ public abstract class RequestPredicates {
|
||||
* against the given path pattern.
|
||||
* @param pattern the pattern to match to
|
||||
* @return a predicate that tests against the given path pattern
|
||||
* @see org.springframework.web.util.pattern.PathPattern
|
||||
*/
|
||||
public static RequestPredicate path(String pattern) {
|
||||
Assert.notNull(pattern, "'pattern' must not be null");
|
||||
@@ -168,6 +169,7 @@ public abstract class RequestPredicates {
|
||||
* @param pattern the path pattern to match against
|
||||
* @return a predicate that matches if the request method is GET and if the given pattern
|
||||
* matches against the request path
|
||||
* @see org.springframework.web.util.pattern.PathPattern
|
||||
*/
|
||||
public static RequestPredicate GET(String pattern) {
|
||||
return method(HttpMethod.GET).and(path(pattern));
|
||||
@@ -179,6 +181,7 @@ public abstract class RequestPredicates {
|
||||
* @param pattern the path pattern to match against
|
||||
* @return a predicate that matches if the request method is HEAD and if the given pattern
|
||||
* matches against the request path
|
||||
* @see org.springframework.web.util.pattern.PathPattern
|
||||
*/
|
||||
public static RequestPredicate HEAD(String pattern) {
|
||||
return method(HttpMethod.HEAD).and(path(pattern));
|
||||
@@ -190,6 +193,7 @@ public abstract class RequestPredicates {
|
||||
* @param pattern the path pattern to match against
|
||||
* @return a predicate that matches if the request method is POST and if the given pattern
|
||||
* matches against the request path
|
||||
* @see org.springframework.web.util.pattern.PathPattern
|
||||
*/
|
||||
public static RequestPredicate POST(String pattern) {
|
||||
return method(HttpMethod.POST).and(path(pattern));
|
||||
@@ -201,6 +205,7 @@ public abstract class RequestPredicates {
|
||||
* @param pattern the path pattern to match against
|
||||
* @return a predicate that matches if the request method is PUT and if the given pattern
|
||||
* matches against the request path
|
||||
* @see org.springframework.web.util.pattern.PathPattern
|
||||
*/
|
||||
public static RequestPredicate PUT(String pattern) {
|
||||
return method(HttpMethod.PUT).and(path(pattern));
|
||||
@@ -212,6 +217,7 @@ public abstract class RequestPredicates {
|
||||
* @param pattern the path pattern to match against
|
||||
* @return a predicate that matches if the request method is PATCH and if the given pattern
|
||||
* matches against the request path
|
||||
* @see org.springframework.web.util.pattern.PathPattern
|
||||
*/
|
||||
public static RequestPredicate PATCH(String pattern) {
|
||||
return method(HttpMethod.PATCH).and(path(pattern));
|
||||
@@ -223,6 +229,7 @@ public abstract class RequestPredicates {
|
||||
* @param pattern the path pattern to match against
|
||||
* @return a predicate that matches if the request method is DELETE and if the given pattern
|
||||
* matches against the request path
|
||||
* @see org.springframework.web.util.pattern.PathPattern
|
||||
*/
|
||||
public static RequestPredicate DELETE(String pattern) {
|
||||
return method(HttpMethod.DELETE).and(path(pattern));
|
||||
@@ -234,6 +241,7 @@ public abstract class RequestPredicates {
|
||||
* @param pattern the path pattern to match against
|
||||
* @return a predicate that matches if the request method is OPTIONS and if the given pattern
|
||||
* matches against the request path
|
||||
* @see org.springframework.web.util.pattern.PathPattern
|
||||
*/
|
||||
public static RequestPredicate OPTIONS(String pattern) {
|
||||
return method(HttpMethod.OPTIONS).and(path(pattern));
|
||||
@@ -317,7 +325,6 @@ public abstract class RequestPredicates {
|
||||
else {
|
||||
return newPattern;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -337,6 +344,7 @@ public abstract class RequestPredicates {
|
||||
* Receive notification of a path predicate.
|
||||
* @param pattern the path pattern that makes up the predicate
|
||||
* @see RequestPredicates#path(String)
|
||||
* @see org.springframework.web.util.pattern.PathPattern
|
||||
*/
|
||||
void path(String pattern);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user