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
Copy file name to clipboardExpand all lines: spring-framework-reference/src/mvc.xml
+26-4Lines changed: 26 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -949,10 +949,8 @@ public class RelativePathUriTemplateController {
949
949
950
950
<para>Handler methods that are annotated with
951
951
<classname>@RequestMapping</classname> can have very flexible
952
-
signatures. They may have arguments of the following types, in
953
-
arbitrary order (except for validation results, which need to follow
954
-
right after the corresponding command object, if desired): <!--Reword preceding sentence to clarify, make it a complete sentence and no parentheses: first it says validation results *must*--><!--immediately follow command object, but then it says *if desired*. Clarify what must happen if what is desired. And are validation --><!-- results a type of argument? Relate to the sentence that precedes it.-->
955
-
<itemizedlist>
952
+
signatures. Most of them can be used in arbitrary order (see below for
953
+
more details). <itemizedlist>
956
954
<listitem>
957
955
<para>Request or response objects (Servlet API). Choose any
958
956
specific request or response type, for example
@@ -1084,6 +1082,30 @@ public class RelativePathUriTemplateController {
1084
1082
</listitem>
1085
1083
</itemizedlist></para>
1086
1084
1085
+
<para>The <interfacename>Errors</interfacename> or
1086
+
<interfacename>BindingResult</interfacename> parameters have to follow
1087
+
the model object that is being bound immediately as the method
1088
+
signature might have more that one model object and Spring will create
1089
+
a separate <interfacename>BindingResult</interfacename> instance for
1090
+
each of them so the following sample won't work:</para>
1091
+
1092
+
<example>
1093
+
<title>Invalid ordering of BindingResult and @ModelAttribute</title>
0 commit comments