Interface HandlerMethodAdvice

    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default 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 a HandlerMethod.
      default 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 the MethodParameter being resolved
      default void beforeExecuteMethod​(org.springframework.web.method.HandlerMethod handlerMethod, java.lang.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 Detail

      • beforeResolveArgument

        default 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 the MethodParameter being resolved
        Parameters:
        parameter - the method parameter to resolve.
        handlerMethod - the method to handle
        webRequest - the current request
        Throws:
        java.lang.Exception - in case of errors with the preparation of argument values
      • afterResolveArgument

        default 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 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:
        java.lang.Exception - in case of errors with the preparation of argument values
      • beforeExecuteMethod

        default 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 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:
        java.lang.Exception - if any error caused
      • afterExecuteMethod

        default 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 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:
        java.lang.Exception - if any error caused