open class ServletModelAttributeMethodProcessor : ModelAttributeMethodProcessor
A Servlet-specific ModelAttributeMethodProcessor that applies data binding through a WebDataBinder of type ServletRequestDataBinder.
Also adds a fall-back strategy to instantiate the model attribute from a URI template variable or from a request parameter if the name matches the model attribute name and there is an appropriate type conversion strategy.
Author
Rossen Stoyanchev
Author
Juergen Hoeller
Since
3.1
ServletModelAttributeMethodProcessor(annotationNotRequired: Boolean)
Class constructor. |
open fun handleReturnValue(returnValue: Any, returnType: MethodParameter, mavContainer: ModelAndViewContainer, webRequest: NativeWebRequest): Unit
Add non-null return values to the ModelAndViewContainer. |
|
fun resolveArgument(parameter: MethodParameter, mavContainer: ModelAndViewContainer, webRequest: NativeWebRequest, binderFactory: WebDataBinderFactory): Any
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 |
|
open fun supportsParameter(parameter: MethodParameter): Boolean
Returns |
|
open fun supportsReturnType(returnType: MethodParameter): Boolean
Return |