Code example for AbstractAnnotationConfigDispatcherServletInitializer

0
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer; 
 
/** 
 * @author Rob Winch 
 */ 
public class WebMvcAppInitializer extends AbstractAnnotationConfigDispatcherServletInitializer { 
	@Override 
	protected Class<?>[] getRootConfigClasses() { 
		return null; 
	} 
 
	@Override 
	protected Class<?>[] getServletConfigClasses() { 
		return new Class[] { DataConfig.class, WebMvcConfig.class}; 
	} 
 
	@Override 
	protected String[] getServletMappings() { 
		return new String[] { "/"}; 
	}