Polishing
This commit is contained in:
parent
3ba0a79a57
commit
c6619006eb
|
@ -2195,19 +2195,19 @@ The following example shows how to get the cookie value:
|
||||||
<1> Get the value of the `JSESSIONID` cookie.
|
<1> Get the value of the `JSESSIONID` cookie.
|
||||||
====
|
====
|
||||||
|
|
||||||
if the target method parameter type is not
|
If the target method parameter type is not `String`, type conversion is applied automatically.
|
||||||
`String`, type conversion is applied automatically. See <<mvc-ann-typeconversion>>.
|
See <<mvc-ann-typeconversion>>.
|
||||||
|
|
||||||
|
|
||||||
[[mvc-ann-modelattrib-method-args]]
|
[[mvc-ann-modelattrib-method-args]]
|
||||||
==== `@ModelAttribute`
|
==== `@ModelAttribute`
|
||||||
[.small]#<<web-reactive.adoc#webflux-ann-modelattrib-method-args, Same as in Spring WebFlux>>#
|
[.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
|
You can use the `@ModelAttribute` annotation on a method argument to access an attribute from
|
||||||
model or have it be instantiated if not present. The model attribute is also overlain with
|
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
|
values from HTTP Servlet request parameters whose names match to field names. This is referred
|
||||||
referred to as data binding, and it saves you from having to deal with parsing and
|
to as data binding, and it saves you from having to deal with parsing and converting individual
|
||||||
converting individual query parameters and form fields. The following example shows how to do so:
|
query parameters and form fields. The following example shows how to do so:
|
||||||
|
|
||||||
====
|
====
|
||||||
[source,java,indent=0]
|
[source,java,indent=0]
|
||||||
|
|
Loading…
Reference in New Issue