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 Type
    Method
    Description
    default void
    afterExecuteMethod(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 a HandlerMethod.
    default void
    afterResolveArgument(org.springframework.core.MethodParameter parameter, Object resolvedArgument, org.springframework.web.method.HandlerMethod handlerMethod, org.springframework.web.context.request.NativeWebRequest webRequest)
    callback after the MethodParameter being resolved
    default void
    beforeExecuteMethod(org.springframework.web.method.HandlerMethod handlerMethod, Object[] args, org.springframework.web.context.request.NativeWebRequest request)
    Interception point before the execution of a HandlerMethod.
    default void
    beforeResolveArgument(org.springframework.core.MethodParameter parameter, org.springframework.web.method.HandlerMethod handlerMethod, org.springframework.web.context.request.NativeWebRequest webRequest)
    callback before the MethodParameter being 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 the MethodParameter being resolved
      Parameters:
      parameter - the method parameter to resolve.
      handlerMethod - the method to handle
      webRequest - 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 the MethodParameter being resolved
      Parameters:
      parameter - the method parameter to resolve.
      resolvedArgument - the resolved argument
      handlerMethod - the method to handle
      webRequest - 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 a HandlerMethod. Called after HandlerMapping determined an appropriate handler object, but before HandlerAdapter invokes the handler.
      Parameters:
      handlerMethod - HandlerMethod
      args - the resolved arguments of HandlerMethod
      request - 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 a HandlerMethod. Called after HandlerAdapter actually invoked the handler.
      Parameters:
      handlerMethod - HandlerMethod
      args - the resolved arguments of HandlerMethod
      returnValue - the return value of HandlerMethod
      error - the error after HandlerMethod invocation
      request - WebRequest
      Throws:
      Exception - if any error caused