您只需要定义
dispatcherServlet
@Bean:
@Beanpublic ServletRegistrationBean dispatcherServlet() { ServletRegistrationBean registration = new ServletRegistrationBean( new DispatcherServlet(), "/"); registration.setAsyncSupported(true); return registration;}它会覆盖的默认值
DispatcherServletAutoConfiguration。



