title: Equivalent of mvc:default-servlet-handler in Spring annotation-based configuration?
body: <p>Is it possible to have the equivalent of <code>&lt;mvc:default-servlet-handler/&gt;</code> defined in an <code>AnnotationConfig(Web)ApplicationContext</code>? Right now I have:</p>
  
  <pre><code>@Configuration
  @ImportResource("classpath:/mvc-resources.xml")
  class AppConfig {
    // Other configuration...
  }
  </code></pre>
  
  <p>with just the following in my <code>resources/mvc-resources.xml</code>:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:mvc="http://www.springframework.org/schema/mvc"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="
          http://www.springframework.org/schema/beans
          http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
          http://www.springframework.org/schema/mvc
          http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd"&gt;
  &lt;mvc:default-servlet-handler/&gt;
  &lt;/beans&gt;
  </code></pre>
  
  <p>And it works as expected. Is it possible to do this without importing an XML file? It would be a nice way to cut down on some boilerplate.</p>