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
RestController exception handler for routing-related exceptions.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractRoutingExceptionsHandler(Class<T> jacksonMismatchedInputExceptionClass) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Void> handleHttpMediaTypeNotAcceptable(org.springframework.web.HttpMediaTypeNotAcceptableException exception) org.springframework.http.ResponseEntity<Void> handleHttpMediaTypeNotSupported(org.springframework.web.HttpMediaTypeNotSupportedException exception) org.springframework.http.ResponseEntity<Problem> handleHttpMessageNotReadable(org.springframework.http.converter.HttpMessageNotReadableException exception) org.springframework.http.ResponseEntity<Void> handleHttpRequestMethodNotSupported(org.springframework.web.HttpRequestMethodNotSupportedException exception) org.springframework.http.ResponseEntity<Problem> handleMissingRequestHeaderException(org.springframework.web.bind.MissingRequestHeaderException exception) org.springframework.http.ResponseEntity<Problem> handleMissingServletRequestParameterException(org.springframework.web.bind.MissingServletRequestParameterException exception) protected abstract BadRequestProblemtoBadRequestProblem(T mismatchedInputException)
-
Constructor Details
-
AbstractRoutingExceptionsHandler
-
-
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
-
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)
-