Code example for AbstractAnnotationConfigDispatcherServletInitializer

0
 
package com.jayway.restassured.examples.springmvc.config; 
 
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer; 
 
public class WebApp extends AbstractAnnotationConfigDispatcherServletInitializer { 
    @Override 
    protected Class<?>[] getRootConfigClasses() { 
        return new Class<?>[0]; 
    } 
 
    @Override 
    protected Class<?>[] getServletConfigClasses() { 
        return new Class<?>[]{MainConfiguration.class}; 
    } 
 
    @Override 
    protected String[] getServletMappings() { 
        return new String[]{"/"}; 
    }