Search in sources :

Example 1 with ServerResponseResultHandler

use of org.springframework.web.reactive.function.server.support.ServerResponseResultHandler in project spring-framework by spring-projects.

the class RouterFunctionSpec method initApplicationContext.

private ApplicationContext initApplicationContext() {
    AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
    context.registerBean("webHandler", DispatcherHandler.class, () -> new DispatcherHandler());
    context.registerBean(HandlerMapping.class, () -> RouterFunctions.toHandlerMapping(this.routerFunction));
    context.registerBean(HandlerAdapter.class, () -> new HandlerFunctionAdapter());
    context.registerBean(HandlerResultHandler.class, () -> new ServerResponseResultHandler());
    context.refresh();
    return context;
}
Also used : HandlerFunctionAdapter(org.springframework.web.reactive.function.server.support.HandlerFunctionAdapter) AnnotationConfigApplicationContext(org.springframework.context.annotation.AnnotationConfigApplicationContext) DispatcherHandler(org.springframework.web.reactive.DispatcherHandler) ServerResponseResultHandler(org.springframework.web.reactive.function.server.support.ServerResponseResultHandler)

Aggregations

AnnotationConfigApplicationContext (org.springframework.context.annotation.AnnotationConfigApplicationContext)1 DispatcherHandler (org.springframework.web.reactive.DispatcherHandler)1 HandlerFunctionAdapter (org.springframework.web.reactive.function.server.support.HandlerFunctionAdapter)1 ServerResponseResultHandler (org.springframework.web.reactive.function.server.support.ServerResponseResultHandler)1