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())); }
@Override protected Class<?>[] getServletConfigClasses() { return new Class<?>[] { DelegatingWebMvcConfiguration.class, FrontFacadeWebSocketAutoConfiguration.class }; }
@Override protected Class<?>[] getServletConfigClasses() { return new Class[] { DelegatingWebMvcConfiguration.class, TestWebSocketConfig.class }; }