Package | Description |
---|---|
org.springframework.test.web.reactive.server |
Support for testing Spring WebFlux server endpoints via
WebTestClient . |
org.springframework.web.reactive.function.server |
Provides the types that make up Spring's functional web framework.
|
org.springframework.web.reactive.function.server.support |
Classes supporting the
org.springframework.web.reactive.function.server package. |
Modifier and Type | Method and Description |
---|---|
static WebTestClient.RouterFunctionSpec |
WebTestClient.bindToRouterFunction(RouterFunction<?> routerFunction)
Use this option to set up a server from a
RouterFunction . |
Modifier and Type | Method and Description |
---|---|
default RouterFunction<T> |
RouterFunction.and(RouterFunction<T> other)
Return a composed routing function that first invokes this function,
and then invokes the
other function (of the same response type T )
if this route had no result. |
default RouterFunction<T> |
RouterFunction.andNest(RequestPredicate predicate,
RouterFunction<T> routerFunction)
Return a composed routing function that routes to the given router function if this
route does not match and the given request predicate applies.
|
default RouterFunction<?> |
RouterFunction.andOther(RouterFunction<?> other)
Return a composed routing function that first invokes this function,
and then invokes the
other function (of a different response type) if this route had
no result. |
default RouterFunction<T> |
RouterFunction.andRoute(RequestPredicate predicate,
HandlerFunction<T> handlerFunction)
Return a composed routing function that routes to the given handler function if this
route does not match and the given request predicate applies.
|
default <S extends ServerResponse> |
RouterFunction.filter(HandlerFilterFunction<T,S> filterFunction)
Filter all handler functions routed by this function with the given
filter function.
|
static <T extends ServerResponse> |
RouterFunctions.nest(RequestPredicate predicate,
RouterFunction<T> routerFunction)
Route to the given router function if the given request predicate applies.
|
static RouterFunction<ServerResponse> |
RouterFunctions.resources(Function<ServerRequest,reactor.core.publisher.Mono<Resource>> lookupFunction)
Route to resources using the provided lookup function.
|
static RouterFunction<ServerResponse> |
RouterFunctions.resources(String pattern,
Resource location)
Route requests that match the given pattern to resources relative to the given root location.
|
static <T extends ServerResponse> |
RouterFunctions.route(RequestPredicate predicate,
HandlerFunction<T> handlerFunction)
Route to the given handler function if the given request predicate applies.
|
Modifier and Type | Method and Description |
---|---|
default RouterFunction<T> |
RouterFunction.and(RouterFunction<T> other)
Return a composed routing function that first invokes this function,
and then invokes the
other function (of the same response type T )
if this route had no result. |
default RouterFunction<T> |
RouterFunction.andNest(RequestPredicate predicate,
RouterFunction<T> routerFunction)
Return a composed routing function that routes to the given router function if this
route does not match and the given request predicate applies.
|
default RouterFunction<?> |
RouterFunction.andOther(RouterFunction<?> other)
Return a composed routing function that first invokes this function,
and then invokes the
other function (of a different response type) if this route had
no result. |
static <T extends ServerResponse> |
RouterFunctions.nest(RequestPredicate predicate,
RouterFunction<T> routerFunction)
Route to the given router function if the given request predicate applies.
|
static HttpHandler |
RouterFunctions.toHttpHandler(RouterFunction<?> routerFunction)
Convert the given router function into a
HttpHandler . |
static HttpHandler |
RouterFunctions.toHttpHandler(RouterFunction<?> routerFunction,
HandlerStrategies strategies)
Convert the given router function into a
HttpHandler ,
using the given strategies. |
static WebHandler |
RouterFunctions.toWebHandler(RouterFunction<?> routerFunction)
Convert the given router function into a
WebHandler . |
static WebHandler |
RouterFunctions.toWebHandler(RouterFunction<?> routerFunction,
HandlerStrategies strategies)
Convert the given router function into a
WebHandler ,
using the given strategies. |
void |
RouterFunctions.Visitor.unknown(RouterFunction<?> routerFunction)
Receive notification of an unknown router function.
|
Modifier and Type | Method and Description |
---|---|
RouterFunction<?> |
RouterFunctionMapping.getRouterFunction()
Return the configured
RouterFunction . |
Constructor and Description |
---|
RouterFunctionMapping(RouterFunction<?> routerFunction)
Create a
RouterFunctionMapping with the given RouterFunction . |