接口 HandlerMethodInterceptor

    • 方法概要

      所有方法 实例方法 抽象方法 
      修饰符和类型 方法 说明
      void afterExecute​(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.
      void beforeExecute​(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.
    • 方法详细资料

      • beforeExecute

        void beforeExecute​(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.
        参数:
        handlerMethod - HandlerMethod
        args - the resolved arguments of HandlerMethod
        request - WebRequest
        抛出:
        java.lang.Exception - if any error caused
      • afterExecute

        void afterExecute​(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.
        参数:
        handlerMethod - HandlerMethod
        args - the resolved arguments of HandlerMethod
        returnValue - the return value of HandlerMethod
        error - the error after HandlerMethod invocation
        request - WebRequest
        抛出:
        java.lang.Exception - if any error caused