|
|
|
@ -1,5 +1,5 @@ |
|
|
|
/* |
|
|
|
/* |
|
|
|
* Copyright 2002-2024 the original author or authors. |
|
|
|
* Copyright 2002-2025 the original author or authors. |
|
|
|
* |
|
|
|
* |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
@ -153,7 +153,7 @@ public abstract class RouterFunctions { |
|
|
|
* Resource resource = new ClassPathResource("static/index.html") |
|
|
|
* Resource resource = new ClassPathResource("static/index.html") |
|
|
|
* RouterFunction<ServerResponse> resources = RouterFunctions.resource(path("/api/**").negate(), resource); |
|
|
|
* RouterFunction<ServerResponse> resources = RouterFunctions.resource(path("/api/**").negate(), resource); |
|
|
|
* </pre> |
|
|
|
* </pre> |
|
|
|
* @param predicate predicate to match |
|
|
|
* @param predicate the predicate to match |
|
|
|
* @param resource the resources to serve |
|
|
|
* @param resource the resources to serve |
|
|
|
* @return a router function that routes to a resource |
|
|
|
* @return a router function that routes to a resource |
|
|
|
* @since 6.1.4 |
|
|
|
* @since 6.1.4 |
|
|
|
@ -169,7 +169,7 @@ public abstract class RouterFunctions { |
|
|
|
* Resource resource = new ClassPathResource("static/index.html") |
|
|
|
* Resource resource = new ClassPathResource("static/index.html") |
|
|
|
* RouterFunction<ServerResponse> resources = RouterFunctions.resource(path("/api/**").negate(), resource); |
|
|
|
* RouterFunction<ServerResponse> resources = RouterFunctions.resource(path("/api/**").negate(), resource); |
|
|
|
* </pre> |
|
|
|
* </pre> |
|
|
|
* @param predicate predicate to match |
|
|
|
* @param predicate the predicate to match |
|
|
|
* @param resource the resources to serve |
|
|
|
* @param resource the resources to serve |
|
|
|
* @param headersConsumer provides access to the HTTP headers for served resources |
|
|
|
* @param headersConsumer provides access to the HTTP headers for served resources |
|
|
|
* @return a router function that routes to a resource |
|
|
|
* @return a router function that routes to a resource |
|
|
|
@ -384,7 +384,7 @@ public abstract class RouterFunctions { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Adds a route to the given handler function that handles all HTTP {@code GET} requests |
|
|
|
* Adds a route to the given handler function that handles all HTTP {@code GET} requests |
|
|
|
* that match the given predicate. |
|
|
|
* that match the given predicate. |
|
|
|
* @param predicate predicate to match |
|
|
|
* @param predicate the predicate to match |
|
|
|
* @param handlerFunction the handler function to handle all {@code GET} requests that |
|
|
|
* @param handlerFunction the handler function to handle all {@code GET} requests that |
|
|
|
* match {@code predicate} |
|
|
|
* match {@code predicate} |
|
|
|
* @return this builder |
|
|
|
* @return this builder |
|
|
|
@ -436,7 +436,7 @@ public abstract class RouterFunctions { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Adds a route to the given handler function that handles all HTTP {@code HEAD} requests |
|
|
|
* Adds a route to the given handler function that handles all HTTP {@code HEAD} requests |
|
|
|
* that match the given predicate. |
|
|
|
* that match the given predicate. |
|
|
|
* @param predicate predicate to match |
|
|
|
* @param predicate the predicate to match |
|
|
|
* @param handlerFunction the handler function to handle all {@code HEAD} requests that |
|
|
|
* @param handlerFunction the handler function to handle all {@code HEAD} requests that |
|
|
|
* match {@code predicate} |
|
|
|
* match {@code predicate} |
|
|
|
* @return this builder |
|
|
|
* @return this builder |
|
|
|
@ -479,7 +479,7 @@ public abstract class RouterFunctions { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Adds a route to the given handler function that handles all HTTP {@code POST} requests |
|
|
|
* Adds a route to the given handler function that handles all HTTP {@code POST} requests |
|
|
|
* that match the given predicate. |
|
|
|
* that match the given predicate. |
|
|
|
* @param predicate predicate to match |
|
|
|
* @param predicate the predicate to match |
|
|
|
* @param handlerFunction the handler function to handle all {@code POST} requests that |
|
|
|
* @param handlerFunction the handler function to handle all {@code POST} requests that |
|
|
|
* match {@code predicate} |
|
|
|
* match {@code predicate} |
|
|
|
* @return this builder |
|
|
|
* @return this builder |
|
|
|
@ -530,7 +530,7 @@ public abstract class RouterFunctions { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Adds a route to the given handler function that handles all HTTP {@code PUT} requests |
|
|
|
* Adds a route to the given handler function that handles all HTTP {@code PUT} requests |
|
|
|
* that match the given predicate. |
|
|
|
* that match the given predicate. |
|
|
|
* @param predicate predicate to match |
|
|
|
* @param predicate the predicate to match |
|
|
|
* @param handlerFunction the handler function to handle all {@code PUT} requests that |
|
|
|
* @param handlerFunction the handler function to handle all {@code PUT} requests that |
|
|
|
* match {@code predicate} |
|
|
|
* match {@code predicate} |
|
|
|
* @return this builder |
|
|
|
* @return this builder |
|
|
|
@ -581,7 +581,7 @@ public abstract class RouterFunctions { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Adds a route to the given handler function that handles all HTTP {@code PATCH} requests |
|
|
|
* Adds a route to the given handler function that handles all HTTP {@code PATCH} requests |
|
|
|
* that match the given predicate. |
|
|
|
* that match the given predicate. |
|
|
|
* @param predicate predicate to match |
|
|
|
* @param predicate the predicate to match |
|
|
|
* @param handlerFunction the handler function to handle all {@code PATCH} requests that |
|
|
|
* @param handlerFunction the handler function to handle all {@code PATCH} requests that |
|
|
|
* match {@code predicate} |
|
|
|
* match {@code predicate} |
|
|
|
* @return this builder |
|
|
|
* @return this builder |
|
|
|
@ -632,7 +632,7 @@ public abstract class RouterFunctions { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Adds a route to the given handler function that handles all HTTP {@code DELETE} requests |
|
|
|
* Adds a route to the given handler function that handles all HTTP {@code DELETE} requests |
|
|
|
* that match the given predicate. |
|
|
|
* that match the given predicate. |
|
|
|
* @param predicate predicate to match |
|
|
|
* @param predicate the predicate to match |
|
|
|
* @param handlerFunction the handler function to handle all {@code DELETE} requests that |
|
|
|
* @param handlerFunction the handler function to handle all {@code DELETE} requests that |
|
|
|
* match {@code predicate} |
|
|
|
* match {@code predicate} |
|
|
|
* @return this builder |
|
|
|
* @return this builder |
|
|
|
@ -675,7 +675,7 @@ public abstract class RouterFunctions { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Adds a route to the given handler function that handles all HTTP {@code OPTIONS} requests |
|
|
|
* Adds a route to the given handler function that handles all HTTP {@code OPTIONS} requests |
|
|
|
* that match the given predicate. |
|
|
|
* that match the given predicate. |
|
|
|
* @param predicate predicate to match |
|
|
|
* @param predicate the predicate to match |
|
|
|
* @param handlerFunction the handler function to handle all {@code OPTIONS} requests that |
|
|
|
* @param handlerFunction the handler function to handle all {@code OPTIONS} requests that |
|
|
|
* match {@code predicate} |
|
|
|
* match {@code predicate} |
|
|
|
* @return this builder |
|
|
|
* @return this builder |
|
|
|
@ -735,7 +735,7 @@ public abstract class RouterFunctions { |
|
|
|
* Resource resource = new ClassPathResource("static/index.html") |
|
|
|
* Resource resource = new ClassPathResource("static/index.html") |
|
|
|
* RouterFunction<ServerResponse> resources = RouterFunctions.resource(path("/api/**").negate(), resource); |
|
|
|
* RouterFunction<ServerResponse> resources = RouterFunctions.resource(path("/api/**").negate(), resource); |
|
|
|
* </pre> |
|
|
|
* </pre> |
|
|
|
* @param predicate predicate to match |
|
|
|
* @param predicate the predicate to match |
|
|
|
* @param resource the resources to serve |
|
|
|
* @param resource the resources to serve |
|
|
|
* @return a router function that routes to a resource |
|
|
|
* @return a router function that routes to a resource |
|
|
|
* @since 6.1.4 |
|
|
|
* @since 6.1.4 |
|
|
|
@ -749,7 +749,7 @@ public abstract class RouterFunctions { |
|
|
|
* Resource resource = new ClassPathResource("static/index.html") |
|
|
|
* Resource resource = new ClassPathResource("static/index.html") |
|
|
|
* RouterFunction<ServerResponse> resources = RouterFunctions.resource(path("/api/**").negate(), resource); |
|
|
|
* RouterFunction<ServerResponse> resources = RouterFunctions.resource(path("/api/**").negate(), resource); |
|
|
|
* </pre> |
|
|
|
* </pre> |
|
|
|
* @param predicate predicate to match |
|
|
|
* @param predicate the predicate to match |
|
|
|
* @param resource the resources to serve |
|
|
|
* @param resource the resources to serve |
|
|
|
* @param headersConsumer provides access to the HTTP headers for served resources |
|
|
|
* @param headersConsumer provides access to the HTTP headers for served resources |
|
|
|
* @return a router function that routes to a resource |
|
|
|
* @return a router function that routes to a resource |
|
|
|
|