@ControllerAdvice public class RestControllerAdvice extends Object
Constructor and Description |
---|
RestControllerAdvice() |
Modifier and Type | Method and Description |
---|---|
org.springframework.hateoas.VndErrors |
onClientGenericBadRequest(Exception e)
Client did not formulate a correct request.
|
org.springframework.hateoas.VndErrors |
onConflictException(Exception e)
Log the exception message at warn level and stack trace as trace level.
|
org.springframework.hateoas.VndErrors |
onException(Exception e)
Handles the general error case.
|
org.springframework.hateoas.VndErrors |
onNotFoundException(Exception e)
Log the exception message at warn level and stack trace as trace level.
|
org.springframework.hateoas.VndErrors |
onUnprocessableEntityException(Exception e)
Log the exception message at warn level and stack trace as trace level.
|
@ExceptionHandler(value=java.lang.Exception.class) @ResponseStatus(value=INTERNAL_SERVER_ERROR) @ResponseBody public org.springframework.hateoas.VndErrors onException(Exception e)
@ExceptionHandler(value={AppAlreadyRegisteredException.class,DuplicateStreamDefinitionException.class,DuplicateTaskException.class,StreamAlreadyDeployedException.class,StreamAlreadyDeployingException.class}) @ResponseStatus(value=CONFLICT) @ResponseBody public org.springframework.hateoas.VndErrors onConflictException(Exception e)
@ExceptionHandler(value={JobNotRestartableException.class,org.springframework.batch.core.launch.JobExecutionNotRunningException.class}) @ResponseStatus(value=UNPROCESSABLE_ENTITY) @ResponseBody public org.springframework.hateoas.VndErrors onUnprocessableEntityException(Exception e)
@ExceptionHandler(value={NoSuchStreamDefinitionException.class,org.springframework.cloud.dataflow.registry.support.NoSuchAppRegistrationException.class,NoSuchTaskDefinitionException.class,NoSuchTaskExecutionException.class,org.springframework.batch.core.launch.NoSuchJobExecutionException.class,org.springframework.batch.core.launch.NoSuchJobInstanceException.class,org.springframework.batch.core.launch.NoSuchJobException.class,org.springframework.batch.admin.service.NoSuchStepExecutionException.class,org.springframework.boot.actuate.endpoint.mvc.MetricsMvcEndpoint.NoSuchMetricException.class}) @ResponseStatus(value=NOT_FOUND) @ResponseBody public org.springframework.hateoas.VndErrors onNotFoundException(Exception e)
@ExceptionHandler(value=org.springframework.web.bind.MissingServletRequestParameterException.class) @ResponseStatus(value=BAD_REQUEST) @ResponseBody public org.springframework.hateoas.VndErrors onClientGenericBadRequest(Exception e)
Copyright © 2017 Pivotal Software, Inc.. All rights reserved.