Class HandlerExceptionResolverComposite
java.lang.Object
org.springframework.web.servlet.handler.HandlerExceptionResolverComposite
- All Implemented Interfaces:
- Ordered,- HandlerExceptionResolver
public class HandlerExceptionResolverComposite
extends Object
implements HandlerExceptionResolver, Ordered
A 
HandlerExceptionResolver that delegates to a list of other
 HandlerExceptionResolvers.- Since:
- 3.1
- Author:
- Rossen Stoyanchev
- 
Field SummaryFields inherited from interface org.springframework.core.OrderedHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionReturn the list of exception resolvers to delegate to.intgetOrder()Get the order value of this object.resolveException(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) Resolve the exception by iterating over the list of configured exception resolvers.voidsetExceptionResolvers(List<HandlerExceptionResolver> exceptionResolvers) Set the list of exception resolvers to delegate to.voidsetOrder(int order) 
- 
Constructor Details- 
HandlerExceptionResolverCompositepublic HandlerExceptionResolverComposite()
 
- 
- 
Method Details- 
setExceptionResolversSet the list of exception resolvers to delegate to.
- 
getExceptionResolversReturn the list of exception resolvers to delegate to.
- 
setOrderpublic void setOrder(int order) 
- 
getOrderpublic int getOrder()Description copied from interface:OrderedGet 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-startupvalues).Same order values will result in arbitrary sort positions for the affected objects. 
- 
resolveException@Nullable public ModelAndView resolveException(HttpServletRequest request, HttpServletResponse response, @Nullable Object handler, Exception ex) Resolve the exception by iterating over the list of configured exception resolvers.The first one to return a ModelAndViewwins. Otherwisenullis returned.- Specified by:
- resolveExceptionin interface- HandlerExceptionResolver
- Parameters:
- request- current HTTP request
- response- current HTTP response
- handler- the executed handler, or- nullif 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 ModelAndViewto forward to, ornullfor default processing in the resolution chain
 
 
-