spring-framework / org.springframework.web.method.annotation / ModelAttributeMethodProcessor / resolveArgument

resolveArgument

@Nullable fun resolveArgument(parameter: MethodParameter, @Nullable mavContainer: ModelAndViewContainer, webRequest: NativeWebRequest, @Nullable binderFactory: WebDataBinderFactory): Any

Overrides HandlerMethodArgumentResolver.resolveArgument

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.

Exceptions

BindException - if data binding and validation result in an error and the next method parameter is not of type Errors

Exception - if WebDataBinder initialization fails