Class CustomDefaultHandlerExceptionResolver

java.lang.Object
org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver
org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver
de.dlr.proseo.ordermgr.CustomDefaultHandlerExceptionResolver
All Implemented Interfaces:
org.springframework.core.Ordered, org.springframework.web.servlet.HandlerExceptionResolver

@Component public class CustomDefaultHandlerExceptionResolver extends org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver
Extend the REST Api exception handling forward message to the calling service. This handler keep the exception and throw it again, then the ApiExceptionHandler consumes it.
Author:
Ernst Melchinger
  • Field Summary

    Fields inherited from class org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver

    PAGE_NOT_FOUND_LOG_CATEGORY, pageNotFoundLogger

    Fields inherited from class org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver

    logger

    Fields inherited from interface org.springframework.core.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.springframework.web.servlet.ModelAndView
    handleHttpMessageNotReadable(org.springframework.http.converter.HttpMessageNotReadableException ex, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object handler)
     

    Methods inherited from class org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver

    doResolveException, handleAsyncRequestNotUsableException, handleAsyncRequestTimeoutException, handleConversionNotSupported, handleDisconnectedClientException, handleErrorResponse, handleHandlerMethodValidationException, handleHttpMediaTypeNotAcceptable, handleHttpMediaTypeNotSupported, handleHttpMessageNotWritable, handleHttpRequestMethodNotSupported, handleMethodArgumentNotValidException, handleMethodValidationException, handleMissingPathVariable, handleMissingServletRequestParameter, handleMissingServletRequestPartException, handleNoHandlerFoundException, handleNoResourceFoundException, handleServletRequestBindingException, handleTypeMismatch, logException, sendServerError

    Methods inherited from class org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver

    addMappedHandlerClass, buildLogMessage, getMappedHandlerClasses, getOrder, hasHandlerMappings, prepareResponse, preventCaching, resolveException, setMappedHandlerClasses, setMappedHandlerPredicate, setMappedHandlers, setOrder, setPreventResponseCaching, setWarnLogCategory, shouldApplyTo

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CustomDefaultHandlerExceptionResolver

      public CustomDefaultHandlerExceptionResolver()
  • Method Details

    • handleHttpMessageNotReadable

      protected org.springframework.web.servlet.ModelAndView handleHttpMessageNotReadable(org.springframework.http.converter.HttpMessageNotReadableException ex, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object handler) throws IOException
      Overrides:
      handleHttpMessageNotReadable in class org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver
      Throws:
      IOException