List of usage examples for org.springframework.web.servlet.config.annotation AsyncSupportConfigurer AsyncSupportConfigurer
AsyncSupportConfigurer
From source file:co.paralleluniverse.springframework.web.servlet.config.annotation.FiberWebMvcConfigurationSupport.java
@Bean public FiberRequestMappingHandlerAdapter fiberRequestMappingHandlerAdapter() { List<HandlerMethodArgumentResolver> argumentResolvers = new ArrayList<>(); addArgumentResolvers(argumentResolvers); List<HandlerMethodReturnValueHandler> returnValueHandlers = new ArrayList<>(); addReturnValueHandlers(returnValueHandlers); FiberRequestMappingHandlerAdapter adapter = new FiberRequestMappingHandlerAdapter(); adapter.setContentNegotiationManager(mvcContentNegotiationManager()); adapter.setMessageConverters(getMessageConverters()); adapter.setWebBindingInitializer(getConfigurableWebBindingInitializer()); adapter.setCustomArgumentResolvers(argumentResolvers); adapter.setCustomReturnValueHandlers(returnValueHandlers); AsyncSupportConfigurer configurer = new AsyncSupportConfigurer(); configureAsyncSupport(configurer);/*from w w w . jav a2s .c o m*/ if (ServletConfigAnnotationProtectedProxy.getTaskExecutor(configurer) != null) { adapter.setTaskExecutor(ServletConfigAnnotationProtectedProxy.getTaskExecutor(configurer)); } if (ServletConfigAnnotationProtectedProxy.getTimeout(configurer) != null) { adapter.setAsyncRequestTimeout(ServletConfigAnnotationProtectedProxy.getTimeout(configurer)); } adapter.setCallableInterceptors(ServletConfigAnnotationProtectedProxy.getCallableInterceptors(configurer)); adapter.setDeferredResultInterceptors( ServletConfigAnnotationProtectedProxy.getDeferredResultInterceptors(configurer)); return adapter; }