Update section on type conversion for web method arguments
Closes gh-26088
This commit is contained in:
parent
238354a081
commit
c22a483c3d
|
@ -2009,6 +2009,12 @@ By default, simple types (such as `int`, `long`, `Date`, and others) are support
|
|||
can be customized through a `WebDataBinder` (see <<webflux-ann-initbinder>>) or by registering
|
||||
`Formatters` with the `FormattingConversionService` (see <<core.adoc#format, Spring Field Formatting>>).
|
||||
|
||||
A practical issue in type conversion is the treatment of an empty String source value.
|
||||
Such a value is treated as missing if it becomes `null` as a result of type conversion.
|
||||
This can be the case for `Long`, `UUID`, and other target types. If you want to allow `null`
|
||||
to be injected, either use the `required` flag on the argument annotation, or declare the
|
||||
argument as `@Nullable`.
|
||||
|
||||
|
||||
[[webflux-ann-matrix-variables]]
|
||||
==== Matrix Variables
|
||||
|
|
|
@ -2216,6 +2216,13 @@ type conversion through a `WebDataBinder` (see <<mvc-ann-initbinder>>) or by reg
|
|||
`Formatters` with the `FormattingConversionService`.
|
||||
See <<core.adoc#format, Spring Field Formatting>>.
|
||||
|
||||
A practical issue in type conversion is the treatment of an empty String source value.
|
||||
Such a value is treated as missing if it becomes `null` as a result of type conversion.
|
||||
This can be the case for `Long`, `UUID`, and other target types. If you want to allow `null`
|
||||
to be injected, either use the `required` flag on the argument annotation, or declare the
|
||||
argument as `@Nullable`.
|
||||
|
||||
|
||||
|
||||
[[mvc-ann-matrix-variables]]
|
||||
==== Matrix Variables
|
||||
|
|
Loading…
Reference in New Issue