protected ServletRegistration.Dynamic initSpringRestComponent(ServletContext servletContext, AnnotationConfigWebApplicationContext rootContext,
String restContextRoot, Class<? extends WebMvcConfigurationSupport> webConfigClass) {
LOGGER.debug("Configuring Spring Web application context - {} REST", restContextRoot);
AnnotationConfigWebApplicationContext dispatcherServletConfiguration = new AnnotationConfigWebApplicationContext();
dispatcherServletConfiguration.setParent(rootContext);
dispatcherServletConfiguration.register(webConfigClass);
LOGGER.debug("Registering Spring MVC Servlet - {} REST", restContextRoot);
ServletRegistration.Dynamic dispatcherServlet = servletContext.addServlet(restContextRoot + "-dispatcher", new DispatcherServlet(dispatcherServletConfiguration));
dispatcherServlet.addMapping("/" + restContextRoot + "/*");
dispatcherServlet.setLoadOnStartup(1);
dispatcherServlet.setAsyncSupported(true);
return dispatcherServlet;
}
WebConfigurer.java 文件源码
java
阅读 21
收藏 0
点赞 0
评论 0
项目:flowable-engine
作者:
评论列表
文章目录