Example usage for org.springframework.web.reactive.function.server RouterFunctions toHttpHandler

List of usage examples for org.springframework.web.reactive.function.server RouterFunctions toHttpHandler

Introduction

In this page you can find the example usage for org.springframework.web.reactive.function.server RouterFunctions toHttpHandler.

Prototype

public static HttpHandler toHttpHandler(RouterFunction<?> routerFunction, HandlerStrategies strategies) 

Source Link

Document

Convert the given RouterFunction router function into a HttpHandler , using the given strategies.

Usage

From source file:org.springframework.cloud.function.web.function.FunctionEndpointInitializer.java

private HttpWebHandlerAdapter httpHandler(GenericApplicationContext context) {
    return (HttpWebHandlerAdapter) RouterFunctions.toHttpHandler(context.getBean(RouterFunction.class),
            HandlerStrategies.empty().exceptionHandler(context.getBean(WebExceptionHandler.class))
                    .codecs(config -> config.registerDefaults(true)).build());
}