org.springframework.web.servlet.handler

Class HandlerExceptionResolverComposite

  • java.lang.Object
    • org.springframework.web.servlet.handler.HandlerExceptionResolverComposite
    • Constructor Detail

      • HandlerExceptionResolverComposite

        public HandlerExceptionResolverComposite()
    • Method Detail

      • setExceptionResolvers

        public void setExceptionResolvers(java.util.List<HandlerExceptionResolver> exceptionResolvers)
        Set the list of exception resolvers to delegate to.
      • getExceptionResolvers

        public java.util.List<HandlerExceptionResolver> getExceptionResolvers()
        Return the list of exception resolvers to delegate to.
      • setOrder

        public void setOrder(int order)
      • getOrder

        public int getOrder()
        Description copied from interface: Ordered
        Get the order value of this object.

        Higher values are interpreted as lower priority. As a consequence, the object with the lowest value has the highest priority (somewhat analogous to Servlet load-on-startup values).

        Same order values will result in arbitrary sort positions for the affected objects.

        Specified by:
        getOrder in interface Ordered
        Returns:
        the order value
        See Also:
        Ordered.HIGHEST_PRECEDENCE, Ordered.LOWEST_PRECEDENCE
      • resolveException

        @Nullable
        public ModelAndView resolveException(HttpServletRequest request,
                                                       HttpServletResponse response,
                                                       @Nullable
                                                       java.lang.Object handler,
                                                       java.lang.Exception ex)
        Resolve the exception by iterating over the list of configured exception resolvers.

        The first one to return a ModelAndView wins. Otherwise null is returned.

        Specified by:
        resolveException in interface HandlerExceptionResolver
        Parameters:
        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
        Returns:
        a corresponding ModelAndView to forward to, or null for default processing in the resolution chain