title: spring boot,Where's the Root WebApplicationContext and Servlet WebApplicationContext
body: <p>I use spring-boot-starter-web 1.5.17.I can't find any auto configuration about build Root WebApplicationContext and Servlet WebApplicationContext.</p>
  
  <p>When not use spring boot,we need do this</p>
  
  <pre><code>public class WebInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {
  
  @Override
  protected String[] getServletMappings() {
      return new String[]{"/"};
  }
  
  
  @Override
  protected Class&lt;?&gt;[] getRootConfigClasses() {
      return new Class&lt;?&gt;[]{SecurityAdminConfig.class, DataSourceConfig.class, JavaConfig.class};
  }
  
  @Override
  protected Class&lt;?&gt;[] getServletConfigClasses() {
      return new Class&lt;?&gt;[]{WebMvcConfig.class};
  }
  //controller、service
  </code></pre>
  
  <p>I know WebMvcAutoConfiguration do a lot of spring MVC configuration,but i can't find about auto build Root WebApplicationContext and Servlet WebApplicationContext.</p>
  
  <pre><code>public abstract class AbstractAnnotationConfigDispatcherServletInitializer
      extends AbstractDispatcherServletInitializer {
  
  @Override
  protected WebApplicationContext createRootApplicationContext() {
      Class&lt;?&gt;[] configClasses = getRootConfigClasses();
      if (!ObjectUtils.isEmpty(configClasses)) {
          AnnotationConfigWebApplicationContext rootAppContext = new AnnotationConfigWebApplicationContext();
          rootAppContext.register(configClasses);
          return rootAppContext;
      }
      else {
          return null;
      }
  }
  
  @Override
  protected WebApplicationContext createServletApplicationContext() {
      AnnotationConfigWebApplicationContext servletAppContext = new AnnotationConfigWebApplicationContext();
      Class&lt;?&gt;[] configClasses = getServletConfigClasses();
      if (!ObjectUtils.isEmpty(configClasses)) {
          servletAppContext.register(configClasses);
      }
      return servletAppContext;
  }
  
  
  protected abstract Class&lt;?&gt;[] getRootConfigClasses();
  
  
  protected abstract Class&lt;?&gt;[] getServletConfigClasses();
  </code></pre>
  
  <p>}</p>
  
  <p>How can know this beans go Root WebApplicationContext or Servlet WebApplicationContext?</p>
  
  <p><a href="https://i.stack.imgur.com/Uf6I2.png" rel="nofollow noreferrer">image here</a></p>