提交 c6619006 编写于 作者: J Juergen Hoeller

Polishing

上级 3ba0a79a
......@@ -2195,19 +2195,19 @@ The following example shows how to get the cookie value:
<1> Get the value of the `JSESSIONID` cookie.
====
if the target method parameter type is not
`String`, type conversion is applied automatically. See <<mvc-ann-typeconversion>>.
If the target method parameter type is not `String`, type conversion is applied automatically.
See <<mvc-ann-typeconversion>>.
[[mvc-ann-modelattrib-method-args]]
==== `@ModelAttribute`
[.small]#<<web-reactive.adoc#webflux-ann-modelattrib-method-args, Same as in Spring WebFlux>>#
You can use the `@ModelAttribute` annotation on a method argument to access an attribute from the
model or have it be instantiated if not present. The model attribute is also overlain with
values from HTTP Servlet request parameters whose names match to field names. This is
referred to as data binding, and it saves you from having to deal with parsing and
converting individual query parameters and form fields. The following example shows how to do so:
You can use the `@ModelAttribute` annotation on a method argument to access an attribute from
the model or have it be instantiated if not present. The model attribute is also overlain with
values from HTTP Servlet request parameters whose names match to field names. This is referred
to as data binding, and it saves you from having to deal with parsing and converting individual
query parameters and form fields. The following example shows how to do so:
====
[source,java,indent=0]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册