Code example for WebMvcConfigurationSupport

0
import org.thymeleaf.templateresolver.ServletContextTemplateResolver; 
import org.thymeleaf.templateresolver.TemplateResolver; 
 
@Configuration 
@ComponentScan(basePackages = { "org.springframework.samples.async" }) 
public class WebMvcConfig extends WebMvcConfigurationSupport { 
 
	@Override 
	public void configureAsyncSupport(AsyncSupportConfigurer configurer) { 
		configurer.setDefaultTimeout(30*1000L); 
	} 
 
	@Override 
	protected void configureMessageConverters(List<HttpMessageConverter<?>> converters) { 
		converters.add(new MappingJackson2HttpMessageConverter()); 
	} 
 
	public void addViewControllers(ViewControllerRegistry registry) { 
		registry.addViewController("/").setViewName("chat"); 
	}