本文整理汇总了Java中org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration类的典型用法代码示例。如果您正苦于以下问题:Java DelegatingWebMvcConfiguration类的具体用法?Java DelegatingWebMvcConfiguration怎么用?Java DelegatingWebMvcConfiguration使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DelegatingWebMvcConfiguration类属于org.springframework.web.servlet.config.annotation包,在下文中一共展示了DelegatingWebMvcConfiguration类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createWebappContext
import org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration; //导入依赖的package包/类
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()));
}
示例2: getServletConfigClasses
import org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration; //导入依赖的package包/类
@Override
protected Class<?>[] getServletConfigClasses() {
return new Class<?>[] { DelegatingWebMvcConfiguration.class, FrontFacadeWebSocketAutoConfiguration.class };
}
示例3: getServletConfigClasses
import org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration; //导入依赖的package包/类
@Override
protected Class<?>[] getServletConfigClasses() {
return new Class[] { DelegatingWebMvcConfiguration.class, TestWebSocketConfig.class };
}