Java 类org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration 实例源码

项目:hypersocket-framework    文件:HypersocketServerImpl.java   
private void createWebappContext() throws ServletException {
    if (log.isDebugEnabled())
        log.debug("Creating spring webapp context");

    servletConfig = new HypersocketServletConfig("default",
            resolvePath(API_PATH));


    webappContext = new AnnotationConfigWebApplicationContext();
    webappContext.setParent(applicationContext);
    webappContext.register(DelegatingWebMvcConfiguration.class);
    webappContext.scan(controllerPackages.toArray(new String[0]));

    webappContext.setServletConfig(servletConfig);
    webappContext.refresh();
    webappContext.start();

    // We use a custom implementation of DispatcherServlet so it does not restrict the HTTP methods
    dispatcherServlet = new NonRestrictedDispatcherServlet(webappContext);
    dispatcherServlet.init(servletConfig);

    registerHttpHandler(new APIRequestHandler(dispatcherServlet, 100));

    eventService.publishEvent(new WebappCreatedEvent(this, true, realmService.getSystemRealm()));

}
项目:appverse-server    文件:DispatcherServletInitializer.java   
@Override
protected Class<?>[] getServletConfigClasses() {
 return new Class<?>[] { DelegatingWebMvcConfiguration.class, FrontFacadeWebSocketAutoConfiguration.class };
}
项目:appverse-server    文件:IntegrationWebsocketTest.java   
@Override
protected Class<?>[] getServletConfigClasses() {
 return new Class[] { DelegatingWebMvcConfiguration.class, TestWebSocketConfig.class };
}