Class AbstractRoutingExceptionsHandler<T extends Exception>

java.lang.Object
io.github.belgif.rest.problem.spring.AbstractRoutingExceptionsHandler<T>
Type Parameters:
T - the type of the Jackson MismatchedInputException
Direct Known Subclasses:
RoutingExceptionsHandler

public abstract class AbstractRoutingExceptionsHandler<T extends Exception> extends Object
RestController exception handler for routing-related exceptions.
  • Constructor Details

    • AbstractRoutingExceptionsHandler

      protected AbstractRoutingExceptionsHandler(Class<T> jacksonMismatchedInputExceptionClass)
  • Method Details

    • handleMissingServletRequestParameterException

      @ExceptionHandler(org.springframework.web.bind.MissingServletRequestParameterException.class) public org.springframework.http.ResponseEntity<Problem> handleMissingServletRequestParameterException(org.springframework.web.bind.MissingServletRequestParameterException exception)
    • handleMissingRequestHeaderException

      @ExceptionHandler(org.springframework.web.bind.MissingRequestHeaderException.class) public org.springframework.http.ResponseEntity<Problem> handleMissingRequestHeaderException(org.springframework.web.bind.MissingRequestHeaderException exception)
    • handleHttpMessageNotReadable

      @ExceptionHandler(org.springframework.http.converter.HttpMessageNotReadableException.class) public org.springframework.http.ResponseEntity<Problem> handleHttpMessageNotReadable(org.springframework.http.converter.HttpMessageNotReadableException exception)
    • toBadRequestProblem

      protected abstract BadRequestProblem toBadRequestProblem(T mismatchedInputException)
    • handleHttpRequestMethodNotSupported

      @ExceptionHandler(org.springframework.web.HttpRequestMethodNotSupportedException.class) public org.springframework.http.ResponseEntity<Void> handleHttpRequestMethodNotSupported(org.springframework.web.HttpRequestMethodNotSupportedException exception)
    • handleHttpMediaTypeNotAcceptable

      @ExceptionHandler(org.springframework.web.HttpMediaTypeNotAcceptableException.class) public org.springframework.http.ResponseEntity<Void> handleHttpMediaTypeNotAcceptable(org.springframework.web.HttpMediaTypeNotAcceptableException exception)
    • handleHttpMediaTypeNotSupported

      @ExceptionHandler(org.springframework.web.HttpMediaTypeNotSupportedException.class) public org.springframework.http.ResponseEntity<Void> handleHttpMediaTypeNotSupported(org.springframework.web.HttpMediaTypeNotSupportedException exception)