Interface HandlerMethodAdvice
- All Known Implementing Classes:
DelegatingHandlerMethodAdvice
public interface HandlerMethodAdvice
Intercepting
HandlerMethod facade interface- Since:
- 1.0.0
- Author:
- Mercy
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidafterExecuteMethod(org.springframework.web.method.HandlerMethod handlerMethod, Object[] args, Object returnValue, Throwable error, org.springframework.web.context.request.NativeWebRequest request) Interception point after successful execution of aHandlerMethod.default voidafterResolveArgument(org.springframework.core.MethodParameter parameter, Object resolvedArgument, org.springframework.web.method.HandlerMethod handlerMethod, org.springframework.web.context.request.NativeWebRequest webRequest) callback after theMethodParameterbeing resolveddefault voidbeforeExecuteMethod(org.springframework.web.method.HandlerMethod handlerMethod, Object[] args, org.springframework.web.context.request.NativeWebRequest request) Interception point before the execution of aHandlerMethod.default voidbeforeResolveArgument(org.springframework.core.MethodParameter parameter, org.springframework.web.method.HandlerMethod handlerMethod, org.springframework.web.context.request.NativeWebRequest webRequest) callback before theMethodParameterbeing resolved
-
Method Details
-
beforeResolveArgument
default void beforeResolveArgument(org.springframework.core.MethodParameter parameter, org.springframework.web.method.HandlerMethod handlerMethod, org.springframework.web.context.request.NativeWebRequest webRequest) throws Exception callback before theMethodParameterbeing resolved- Parameters:
parameter- the method parameter to resolve.handlerMethod- the method to handlewebRequest- the current request- Throws:
Exception- in case of errors with the preparation of argument values
-
afterResolveArgument
default void afterResolveArgument(org.springframework.core.MethodParameter parameter, Object resolvedArgument, org.springframework.web.method.HandlerMethod handlerMethod, org.springframework.web.context.request.NativeWebRequest webRequest) throws Exception callback after theMethodParameterbeing resolved- Parameters:
parameter- the method parameter to resolve.resolvedArgument- the resolved argumenthandlerMethod- the method to handlewebRequest- the current request- Throws:
Exception- in case of errors with the preparation of argument values
-
beforeExecuteMethod
default void beforeExecuteMethod(org.springframework.web.method.HandlerMethod handlerMethod, Object[] args, org.springframework.web.context.request.NativeWebRequest request) throws Exception Interception point before the execution of aHandlerMethod. Called after HandlerMapping determined an appropriate handler object, but before HandlerAdapter invokes the handler.- Parameters:
handlerMethod-HandlerMethodargs- the resolved arguments ofHandlerMethodrequest-WebRequest- Throws:
Exception- if any error caused
-
afterExecuteMethod
default void afterExecuteMethod(org.springframework.web.method.HandlerMethod handlerMethod, Object[] args, @Nullable Object returnValue, @Nullable Throwable error, org.springframework.web.context.request.NativeWebRequest request) throws Exception Interception point after successful execution of aHandlerMethod. Called after HandlerAdapter actually invoked the handler.- Parameters:
handlerMethod-HandlerMethodargs- the resolved arguments ofHandlerMethodreturnValue- the return value ofHandlerMethoderror- the error afterHandlerMethodinvocationrequest-WebRequest- Throws:
Exception- if any error caused
-