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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.slf4j.LoggergetLog()Callback to implementing classes to obtain the configured LoggerHandle aHttpMessageNotReadableExceptionHandle aMethodArgumentNotValidExceptionHandle aHttpMediaTypeNotSupportedExceptionMethods 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:ServiceBrokerExceptionHandlerCallback to implementing classes to obtain the configured Logger- Specified by:
getLogin 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) - 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
-