You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Spring 3 introduces a <literal>mvc</literal> XML configuration namespace that simplifies the setup of Spring MVC inside your web application.
3126
+
Instead of registering low-level beans such as AnnotationMethodHandlerAdapter, you can simply use the namespace and its higher-level constructs.
3127
+
This is generally preferred unless you require finer-grained control of the configuration at the bean level.
3128
+
</para>
3129
+
<para>
3130
+
The mvc namespace consists of three tags: mvc:annotation-driven, mvc:interceptors, and mvc:view-controller.
3131
+
Each of these tags is documented below and in the <ulinkurl="http://static.springsource.org/schema/mvc/spring-mvc-3.0.xsd">XML schema</ulink>.
3132
+
</para>
3133
+
<sectionid="mvc-annotation-driven">
3134
+
<title>mvc:annotation-driven</title>
3135
+
<para>
3136
+
This tag registers the DefaultAnnotationHandlerMapping and AnnotationMethodHandlerAdapter beans that are required for Spring MVC to dispatch requests to @Controllers.
3137
+
The tag configures those two beans with sensible defaults based on what is present in your classpath.
3138
+
The defaults are:
3139
+
<orderedlist>
3140
+
<listitem>
3141
+
<para>
3142
+
Support for Spring 3's Type <linklinkend="core-convert">ConversionService</link> in addition to JavaBeans PropertyEditors during Data Binding.
3143
+
A ConversionService instance produced by the <classname>org.springframework.format.support.FormattingConversionServiceFactoryBean</classname> is used by default.
3144
+
This can be overriden by setting the <literal>conversion-service</literal> attribute.
3145
+
</para>
3146
+
</listitem>
3147
+
<listitem>
3148
+
<para>
3149
+
Support for <linklinkend="format">formatting</link> Number fields using the @NumberFormat annotation
3150
+
</para>
3151
+
</listitem>
3152
+
<listitem>
3153
+
<para>
3154
+
Support for <linklinkend="format">formatting</link> Date, Calendar, Long, and Joda Time fields using the @DateTimeFormat annotation, if Joda Time is present on the classpath.
3155
+
</para>
3156
+
</listitem>
3157
+
<listitem>
3158
+
<para>
3159
+
Support for <linklinkend="validation-mvc-jsr303">validating</link> @Controller inputs with @Valid, if a JSR-303 Provider is present on the classpath.
3160
+
The validation system can be explicitly configured by setting the <literal>validator</literal> attribute.
3161
+
</para>
3162
+
</listitem>
3163
+
<listitem>
3164
+
<para>
3165
+
Support for reading and writing XML, if JAXB is present on the classpath.
3166
+
</para>
3167
+
</listitem>
3168
+
<listitem>
3169
+
<para>
3170
+
Support for reading and writing JSON, if Jackson is present on the classpath.
0 commit comments