# AnnotationDriven

如果不配置,Spring 将从 DispatcherServlet.properties 中加载默认配置。

<mvc:annotation-driven/>

该配置自动加载

<bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"/>
<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"/>

Spring 3.1 reference documentation (opens new window)

<bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping"/>
<bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter"/>