Code example for AbstractAnnotationConfigDispatcherServletInitializer

0
package com.blogspot.babdev.bookapi; 
 
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer; 
 
public class WebAppInitializer extends AbstractAnnotationConfigDispatcherServletInitializer { 
 
    @Override 
    protected Class<?>[] getRootConfigClasses() { 
        return new Class<?>[]{AppConfiguration.class}; 
    } 
 
    @Override 
    protected Class<?>[] getServletConfigClasses() { 
        return new Class[]{WebConfiguration.class}; 
    } 
 
    @Override 
    protected String[] getServletMappings() { 
        return new String[]{"/"};