spring-framework / org.springframework.web.method.support / InvocableHandlerMethod / invokeForRequest

invokeForRequest

@Nullable open fun invokeForRequest(request: NativeWebRequest, @Nullable mavContainer: ModelAndViewContainer, vararg providedArgs: Any): Any

Invoke the method after resolving its argument values in the context of the given request.

Argument values are commonly resolved through HandlerMethodArgumentResolvers. The providedArgs parameter however may supply argument values to be used directly, i.e. without argument resolution. Examples of provided argument values include a WebDataBinder, a SessionStatus, or a thrown exception instance. Provided argument values are checked before argument resolvers.

Parameters

request - the current request

mavContainer - the ModelAndViewContainer for this request

providedArgs - "given" arguments matched by type, not resolved

Exceptions

Exception - raised if no suitable argument resolver can be found, or if the method raised an exception

Return
the raw value returned by the invoked method