Search in sources :

Example 1 with HandlerRegistries

use of cn.taketoday.web.registry.HandlerRegistries in project today-framework by TAKETODAY.

the class WebApplicationLoader method configureHandlerRegistry.

protected void configureHandlerRegistry(List<HandlerRegistry> registries, WebMvcConfiguration mvcConfiguration) {
    DispatcherHandler obtainDispatcher = obtainDispatcher();
    HandlerRegistry handlerRegistry = obtainDispatcher.getHandlerRegistry();
    if (handlerRegistry != null) {
        registries.add(handlerRegistry);
    }
    // 自定义
    mvcConfiguration.configureHandlerRegistry(registries);
    obtainDispatcher.setHandlerRegistry(registries.size() == 1 ? registries.get(0) : new HandlerRegistries(registries));
}
Also used : DispatcherHandler(cn.taketoday.web.handler.DispatcherHandler) ViewControllerHandlerRegistry(cn.taketoday.web.registry.ViewControllerHandlerRegistry) HandlerRegistry(cn.taketoday.web.registry.HandlerRegistry) HandlerRegistries(cn.taketoday.web.registry.HandlerRegistries)

Aggregations

DispatcherHandler (cn.taketoday.web.handler.DispatcherHandler)1 HandlerRegistries (cn.taketoday.web.registry.HandlerRegistries)1 HandlerRegistry (cn.taketoday.web.registry.HandlerRegistry)1 ViewControllerHandlerRegistry (cn.taketoday.web.registry.ViewControllerHandlerRegistry)1