Resolve @ModelAttribute annotated method arguments and handle
return values from @ModelAttribute annotated methods.
Model attributes are obtained from the model or created with a default
constructor (and then added to the model). Once created the attribute is
populated via data binding to Servlet request parameters. Validation may be
applied if the argument is annotated with @javax.validation.Valid.
or Spring's own @org.springframework.validation.annotation.Validated.
When this handler is created with annotationNotRequired=true
any non-simple type argument and return value is regarded as a model
attribute with or without the presence of an @ModelAttribute.
Resolve the argument from the model or if not found instantiate it with
its default if it is available. The model attribute is then populated
with request values via data binding and optionally validated
if @java.validation.Valid is present on the argument.
Extension point to create the model attribute if not found in the model,
with subsequent parameter binding through bean properties (unless suppressed).
The default implementation typically uses the unique public no-arg constructor
if available but also handles a "primary constructor" approach for data classes:
It understands the JavaBeans ConstructorProperties annotation as well as
runtime-retained parameter names in the bytecode, associating request parameters
with constructor arguments by name. If no such constructor is found, the default
constructor will be used (even if not public), assuming subsequent bean property
bindings through setter methods.
attributeName - the name of the attribute (never null)
parameter - the method parameter declaration
binderFactory - for creating WebDataBinder instance