Class RestExceptionHandler


  • @ControllerAdvice
    public class RestExceptionHandler
    extends org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
    • Field Summary

      • Fields inherited from class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler

        logger, PAGE_NOT_FOUND_LOG_CATEGORY, pageNotFoundLogger
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.springframework.http.ResponseEntity<Object> handleMissingServletRequestParameter​(org.springframework.web.bind.MissingServletRequestParameterException ex, org.springframework.http.HttpHeaders headers, org.springframework.http.HttpStatus status, org.springframework.web.context.request.WebRequest request)  
      protected org.springframework.http.ResponseEntity<Object> handleTypeMismatch​(org.springframework.beans.TypeMismatchException ex, org.springframework.http.HttpHeaders headers, org.springframework.http.HttpStatus status, org.springframework.web.context.request.WebRequest request)  
      • Methods inherited from class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler

        handleAsyncRequestTimeoutException, handleBindException, handleConversionNotSupported, handleException, handleExceptionInternal, handleHttpMediaTypeNotAcceptable, handleHttpMediaTypeNotSupported, handleHttpMessageNotReadable, handleHttpMessageNotWritable, handleHttpRequestMethodNotSupported, handleMethodArgumentNotValid, handleMissingPathVariable, handleMissingServletRequestPart, handleNoHandlerFoundException, handleServletRequestBindingException
    • Constructor Detail

      • RestExceptionHandler

        public RestExceptionHandler​(HeadersMapper headersMapper)
    • Method Detail

      • handleMissingServletRequestParameter

        protected org.springframework.http.ResponseEntity<Object> handleMissingServletRequestParameter​(org.springframework.web.bind.MissingServletRequestParameterException ex,
                                                                                                       org.springframework.http.HttpHeaders headers,
                                                                                                       org.springframework.http.HttpStatus status,
                                                                                                       org.springframework.web.context.request.WebRequest request)
        Overrides:
        handleMissingServletRequestParameter in class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
      • handleTypeMismatch

        protected org.springframework.http.ResponseEntity<Object> handleTypeMismatch​(org.springframework.beans.TypeMismatchException ex,
                                                                                     org.springframework.http.HttpHeaders headers,
                                                                                     org.springframework.http.HttpStatus status,
                                                                                     org.springframework.web.context.request.WebRequest request)
        Overrides:
        handleTypeMismatch in class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler