类 AbstractHandlerMethodExceptionResolver

    • 方法详细资料

      • doResolveException

        protected final ModelAndView doResolveException​(HttpServletRequest request,
                                                        HttpServletResponse response,
                                                        Object handler,
                                                        Exception ex)
        从类复制的说明: AbstractHandlerExceptionResolver
        Actually resolve the given exception that got thrown during handler execution, returning a ModelAndView that represents a specific error page if appropriate.

        May be overridden in subclasses, in order to apply specific exception checks. Note that this template method will be invoked after checking whether this resolved applies ("mappedHandlers" etc), so an implementation may simply proceed with its actual exception handling.

        指定者:
        doResolveException 在类中 AbstractHandlerExceptionResolver
        参数:
        request - current HTTP request
        response - current HTTP response
        handler - the executed handler, or null if none chosen at the time of the exception (for example, if multipart resolution failed)
        ex - the exception that got thrown during handler execution
        返回:
        a corresponding ModelAndView to forward to, or null for default processing in the resolution chain
      • doResolveHandlerMethodException

        protected abstract ModelAndView doResolveHandlerMethodException​(HttpServletRequest request,
                                                                        HttpServletResponse response,
                                                                        HandlerMethod handlerMethod,
                                                                        Exception ex)
        Actually resolve the given exception that got thrown during on handler execution, returning a ModelAndView that represents a specific error page if appropriate.

        May be overridden in subclasses, in order to apply specific exception checks. Note that this template method will be invoked after checking whether this resolved applies ("mappedHandlers" etc), so an implementation may simply proceed with its actual exception handling.

        参数:
        request - current HTTP request
        response - current HTTP response
        handlerMethod - the executed handler method, or null if none chosen at the time of the exception (for example, if multipart resolution failed)
        ex - the exception that got thrown during handler execution
        返回:
        a corresponding ModelAndView to forward to, or null for default processing