Java tutorial
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.weib.spittr.config; import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer; /** * * @author zhangjingwei */ public class SpittrWebAppInitializer extends AbstractAnnotationConfigDispatcherServletInitializer { //WEB?SpringAbstractAnnotationConfigDispatcherServletInitializer? @Override protected Class<?>[] getRootConfigClasses() { //?Web? return new Class<?>[] { RootConfig.class }; } @Override protected Class<?>[] getServletConfigClasses() { //Web? return new Class<?>[] { WebConfig.class }; } @Override protected String[] getServletMappings() { ///DispatcherServlet ??RootPath/ return new String[] { "/" }; } }