Class ServiceBrokerWebMvcExceptionHandler
java.lang.Object
org.springframework.cloud.servicebroker.controller.ServiceBrokerExceptionHandler
org.springframework.cloud.servicebroker.controller.ServiceBrokerWebMvcExceptionHandler
@ControllerAdvice(annotations=ServiceBrokerRestController.class)
@ResponseBody
@Order(2147483637)
public class ServiceBrokerWebMvcExceptionHandler
extends ServiceBrokerExceptionHandler
Exception handling logic shared by Web MVC Controllers.
- Author:
- Scott Frederick, Roy Clarkson
-
Field Summary
Fields inherited from class org.springframework.cloud.servicebroker.controller.ServiceBrokerExceptionHandler
UNPROCESSABLE_REQUEST
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected org.slf4j.Logger
getLog()
Callback to implementing classes to obtain the configured Logger.Handle aHttpMessageNotReadableException
.Handle aMethodArgumentNotValidException
.Handle aMissingServletRequestParameterException
.Handle aHttpMediaTypeNotSupportedException
.Methods inherited from class org.springframework.cloud.servicebroker.controller.ServiceBrokerExceptionHandler
getErrorResponse, getErrorResponse, getErrorResponse, getOperationInProgressMessage, handleBindingException, handleException, handleException, handleException, handleException, handleException, handleException, handleException, handleException, handleException, handleException, handleException, handleException, handleException, handleException, handleException, handleException, handleException, handleException, handleException, handleException, handleException, handleException
-
Constructor Details
-
ServiceBrokerWebMvcExceptionHandler
public ServiceBrokerWebMvcExceptionHandler()
-
-
Method Details
-
getLog
protected org.slf4j.Logger getLog()Description copied from class:ServiceBrokerExceptionHandler
Callback to implementing classes to obtain the configured Logger.- Specified by:
getLog
in classServiceBrokerExceptionHandler
- Returns:
- the Logger
-
handleException
@ExceptionHandler(org.springframework.web.bind.MethodArgumentNotValidException.class) @ResponseStatus(BAD_REQUEST) public ErrorMessage handleException(MethodArgumentNotValidException ex) Handle aMethodArgumentNotValidException
.- Parameters:
ex
- the exception- Returns:
- an error message
-
handleException
@ExceptionHandler(org.springframework.web.bind.MissingServletRequestParameterException.class) @ResponseStatus(BAD_REQUEST) public ErrorMessage handleException(MissingServletRequestParameterException ex) Handle aMissingServletRequestParameterException
.- Parameters:
ex
- the exception- Returns:
- an error message
-
handleException
@ExceptionHandler(org.springframework.web.HttpMediaTypeNotSupportedException.class) @ResponseStatus(BAD_REQUEST) public ErrorMessage handleException(HttpMediaTypeNotSupportedException ex) Handle aHttpMediaTypeNotSupportedException
.- Parameters:
ex
- the exception- Returns:
- an error message
-
handleException
@ExceptionHandler(org.springframework.http.converter.HttpMessageNotReadableException.class) @ResponseStatus(BAD_REQUEST) public ErrorMessage handleException(HttpMessageNotReadableException ex) Handle aHttpMessageNotReadableException
.- Parameters:
ex
- the exception- Returns:
- an error message
-