Interface HandlerMethodAdvice
-
- All Known Implementing Classes:
DelegatingHandlerMethodAdvice
public interface HandlerMethodAdvice
InterceptingHandlerMethod
facade interface- Since:
- 1.0.0
- Author:
- Mercy
- See Also:
HandlerMethodInterceptor
,HandlerMethodArgumentInterceptor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
afterExecuteMethod(org.springframework.web.method.HandlerMethod handlerMethod, java.lang.Object[] args, java.lang.Object returnValue, java.lang.Throwable error, org.springframework.web.context.request.NativeWebRequest request)
Interception point after successful execution of aHandlerMethod
.void
afterResolveArgument(org.springframework.core.MethodParameter parameter, java.lang.Object resolvedArgument, org.springframework.web.method.HandlerMethod handlerMethod, org.springframework.web.context.request.NativeWebRequest webRequest)
callback after theMethodParameter
being resolvedvoid
beforeExecuteMethod(org.springframework.web.method.HandlerMethod handlerMethod, java.lang.Object[] args, org.springframework.web.context.request.NativeWebRequest request)
Interception point before the execution of aHandlerMethod
.void
beforeResolveArgument(org.springframework.core.MethodParameter parameter, org.springframework.web.method.HandlerMethod handlerMethod, org.springframework.web.context.request.NativeWebRequest webRequest)
callback before theMethodParameter
being resolved
-
-
-
Method Detail
-
beforeResolveArgument
void beforeResolveArgument(org.springframework.core.MethodParameter parameter, org.springframework.web.method.HandlerMethod handlerMethod, org.springframework.web.context.request.NativeWebRequest webRequest) throws java.lang.Exception
callback before theMethodParameter
being resolved- Parameters:
parameter
- the method parameter to resolve.handlerMethod
- the method to handlewebRequest
- the current request- Throws:
java.lang.Exception
- in case of errors with the preparation of argument values
-
afterResolveArgument
void afterResolveArgument(org.springframework.core.MethodParameter parameter, java.lang.Object resolvedArgument, org.springframework.web.method.HandlerMethod handlerMethod, org.springframework.web.context.request.NativeWebRequest webRequest) throws java.lang.Exception
callback after theMethodParameter
being resolved- Parameters:
parameter
- the method parameter to resolve.resolvedArgument
- the resolved argumenthandlerMethod
- the method to handlewebRequest
- the current request- Throws:
java.lang.Exception
- in case of errors with the preparation of argument values
-
beforeExecuteMethod
void beforeExecuteMethod(org.springframework.web.method.HandlerMethod handlerMethod, java.lang.Object[] args, org.springframework.web.context.request.NativeWebRequest request) throws java.lang.Exception
Interception point before the execution of aHandlerMethod
. Called after HandlerMapping determined an appropriate handler object, but before HandlerAdapter invokes the handler.- Parameters:
handlerMethod
-HandlerMethod
args
- the resolved arguments ofHandlerMethod
request
-WebRequest
- Throws:
java.lang.Exception
- if any error caused
-
afterExecuteMethod
void afterExecuteMethod(org.springframework.web.method.HandlerMethod handlerMethod, java.lang.Object[] args, @Nullable java.lang.Object returnValue, @Nullable java.lang.Throwable error, org.springframework.web.context.request.NativeWebRequest request) throws java.lang.Exception
Interception point after successful execution of aHandlerMethod
. Called after HandlerAdapter actually invoked the handler.- Parameters:
handlerMethod
-HandlerMethod
args
- the resolved arguments ofHandlerMethod
returnValue
- the return value ofHandlerMethod
error
- the error afterHandlerMethod
invocationrequest
-WebRequest
- Throws:
java.lang.Exception
- if any error caused
-
-