Code example for WebMvcConfigurationSupport

0
 * <p>Typically extending from {@link WebMvcConfigurerAdapter} and adding  
 * {@code @EnableWebMvc} is sufficient.  
 *  
 */ 
@Configuration 
public class WebConfig extends WebMvcConfigurationSupport { 
	 
	@Autowired 
	private ApplicationConfig applicationConfig; 
 
	@Override 
	public void addViewControllers(ViewControllerRegistry registry) { 
		registry.addViewController("/").setViewName("home"); 
		registry.addViewController("/login").setViewName("login"); 
	} 
 
	@Bean 
	public InternalResourceViewResolver viewResolver() { 
		InternalResourceViewResolver resolver = new InternalResourceViewResolver(); 
		resolver.setPrefix("/WEB-INF/views/");