use of org.springframework.web.reactive.DispatcherHandler 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;
}
use of org.springframework.web.reactive.DispatcherHandler in project spring-framework by spring-projects.
the class DispatcherHandlerIntegrationTests method createHttpHandler.
@Override
protected HttpHandler createHttpHandler() {
this.wac = new AnnotationConfigApplicationContext();
this.wac.register(TestConfiguration.class);
this.wac.refresh();
DispatcherHandler webHandler = new DispatcherHandler();
webHandler.setApplicationContext(this.wac);
return WebHttpHandlerBuilder.webHandler(webHandler).build();
}
use of org.springframework.web.reactive.DispatcherHandler in project spring-framework by spring-projects.
the class JsonStreamingIntegrationTests method createHttpHandler.
@Override
protected HttpHandler createHttpHandler() {
this.wac = new AnnotationConfigApplicationContext();
this.wac.register(TestConfiguration.class);
this.wac.refresh();
return WebHttpHandlerBuilder.webHandler(new DispatcherHandler(this.wac)).build();
}
use of org.springframework.web.reactive.DispatcherHandler in project spring-framework by spring-projects.
the class SimpleUrlHandlerMappingIntegrationTests method createHttpHandler.
@Override
protected HttpHandler createHttpHandler() {
AnnotationConfigApplicationContext wac = new AnnotationConfigApplicationContext();
wac.register(WebConfig.class);
wac.refresh();
return WebHttpHandlerBuilder.webHandler(new DispatcherHandler(wac)).exceptionHandlers(Collections.singletonList(new ResponseStatusExceptionHandler())).build();
}
use of org.springframework.web.reactive.DispatcherHandler in project spring-framework by spring-projects.
the class SseIntegrationTests method createHttpHandler.
@Override
protected HttpHandler createHttpHandler() {
this.wac = new AnnotationConfigApplicationContext();
this.wac.register(TestConfiguration.class);
this.wac.refresh();
return WebHttpHandlerBuilder.webHandler(new DispatcherHandler(this.wac)).build();
}
Aggregations