HandlerMapping implementation that supports RouterFunctions.
If no RouterFunction is provided at
construction time, this mapping
will detect all router functions in the application context, and consult them in
order.
| Modifier and Type | Field and Description |
|---|---|
| private List | |
| private RouterFunction |
| Access | Constructor and Description |
|---|---|
| public | |
| public | RouterFunctionMapping(RouterFunction<?>
the router function to use for mapping routerFunction)Create a |
| Modifier and Type | Method and Description |
|---|---|
| public void | afterPropertiesSet()
Implements org. Invoked by the containing This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set. |
| protected Mono | getHandlerInternal(ServerWebExchange
current exchange exchange)Implements abstract org. Look up a handler for the given request, returning an empty |
| public RouterFunction | |
| protected void | |
| private void | |
| private List | |
| private void | setAttributes(Map<String, Object> attributes, ServerRequest serverRequest, HandlerFunction<?> handlerFunction)
|
| public void | setMessageReaders(List<HttpMessageReader<?>> messageReaders)
Configure HTTP message readers to de-serialize the request body with. |
| messageReaders | back to summary |
|---|---|
| private List<HttpMessageReader<?>> messageReaders | |
| routerFunction | back to summary |
|---|---|
| private RouterFunction<?> routerFunction
| |
| RouterFunctionMapping | back to summary |
|---|---|
| public RouterFunctionMapping() Create an empty If this constructor is used, this mapping will detect all
| |
| RouterFunctionMapping | back to summary |
|---|---|
| public RouterFunctionMapping(RouterFunction<?> routerFunction) Create a If this constructor is used, no application context detection will occur.
| |
| afterPropertiesSet | back to summary |
|---|---|
| public void afterPropertiesSet() throws Exception Implements org. Doc from org. Invoked by the containing This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set. | |
| getHandlerInternal | back to summary |
|---|---|
| protected Mono Implements abstract org. Doc from org. Look up a handler for the given request, returning an empty On CORS pre-flight requests this method should return a match not for the pre-flight request but for the expected actual request based on the URL path, the HTTP methods from the "Access-Control-Request-Method" header, and the headers from the "Access-Control-Request-Headers" header.
| |
| getRouterFunction | back to summary |
|---|---|
| public RouterFunction Return the configured Note When router functions are detected from the
ApplicationContext, this method may return
| |
| initRouterFunctions | back to summary |
|---|---|
| protected void initRouterFunctions() Initialized the router functions by detecting them in the application context. | |
| logRouterFunctions | back to summary |
|---|---|
| private void logRouterFunctions(List<RouterFunction<?>> routerFunctions) | |
| routerFunctions | back to summary |
|---|---|
| private List | |
| setAttributes | back to summary |
|---|---|
private void setAttributes(Map<String, Object> attributes, ServerRequest serverRequest, HandlerFunction<?> handlerFunction)
| |
| setMessageReaders | back to summary |
|---|---|
| public void setMessageReaders(List<HttpMessageReader<?>> messageReaders) Configure HTTP message readers to de-serialize the request body with. By default this is set to the | |