@API(status=STABLE) public interface AdviceTrait extends AdviceTrait
Advice traits are simple interfaces that provide a single method with a default
implementation. They are used to provide ExceptionHandler implementations to be used in
Controllers and/or in a ControllerAdvice. Clients can choose which traits they what to
use à la carte.
Advice traits are grouped in packages, based on they use cases. Every package has a composite advice trait that
bundles all traits of that package. Additionally there is one major composite advice trait
that in turn bundles all other composites.
ControllerAdvice,
ExceptionHandler,
Throwable,
Exception,
Problem,
ProblemHandling,
CustomAdviceTrait,
GeneralAdviceTrait,
HttpAdviceTrait,
IOAdviceTrait,
NetworkAdviceTrait,
RoutingAdviceTrait,
ValidationAdviceTrait| Modifier and Type | Method and Description |
|---|---|
default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> |
create(org.zalando.problem.StatusType status,
Throwable throwable,
org.springframework.web.context.request.NativeWebRequest request) |
default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> |
create(org.zalando.problem.StatusType status,
Throwable throwable,
org.springframework.web.context.request.NativeWebRequest request,
org.springframework.http.HttpHeaders headers) |
default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> |
create(org.zalando.problem.StatusType status,
Throwable throwable,
org.springframework.web.context.request.NativeWebRequest request,
org.springframework.http.HttpHeaders headers,
URI type) |
default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> |
create(org.zalando.problem.StatusType status,
Throwable throwable,
org.springframework.web.context.request.NativeWebRequest request,
URI type) |
default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> |
create(Throwable throwable,
org.springframework.web.context.request.NativeWebRequest request)
Creates a
problem response for the given throwable
by taking any ResponseStatus annotation on the exception type or one of the causes into account. |
default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> |
create(org.zalando.problem.ThrowableProblem problem,
org.springframework.web.context.request.NativeWebRequest request) |
default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> |
create(Throwable throwable,
org.zalando.problem.Problem problem,
org.springframework.web.context.request.NativeWebRequest request) |
default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> |
create(org.zalando.problem.ThrowableProblem problem,
org.springframework.web.context.request.NativeWebRequest request,
org.springframework.http.HttpHeaders headers) |
default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> |
create(Throwable throwable,
org.zalando.problem.Problem problem,
org.springframework.web.context.request.NativeWebRequest request,
org.springframework.http.HttpHeaders headers) |
default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> |
fallback(Throwable throwable,
org.zalando.problem.Problem problem,
org.springframework.web.context.request.NativeWebRequest request,
org.springframework.http.HttpHeaders headers) |
default void |
log(Throwable throwable,
org.zalando.problem.Problem problem,
org.springframework.web.context.request.NativeWebRequest request,
org.springframework.http.HttpStatus status) |
default Optional<org.springframework.http.MediaType> |
negotiate(org.springframework.web.context.request.NativeWebRequest request) |
default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> |
process(org.springframework.http.ResponseEntity<org.zalando.problem.Problem> entity,
org.springframework.web.context.request.NativeWebRequest request) |
createStackTrace, isCausalChainsEnabled, prepare, process, resolveResponseStatus, toProblem, toProblem, toProblemdefault org.springframework.http.ResponseEntity<org.zalando.problem.Problem> create(Throwable throwable, org.springframework.web.context.request.NativeWebRequest request)
problem response for the given throwable
by taking any ResponseStatus annotation on the exception type or one of the causes into account.throwable - exception being caughtrequest - incoming requestdefault org.springframework.http.ResponseEntity<org.zalando.problem.Problem> create(org.zalando.problem.StatusType status,
Throwable throwable,
org.springframework.web.context.request.NativeWebRequest request)
default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> create(org.zalando.problem.StatusType status,
Throwable throwable,
org.springframework.web.context.request.NativeWebRequest request,
org.springframework.http.HttpHeaders headers)
default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> create(org.zalando.problem.StatusType status,
Throwable throwable,
org.springframework.web.context.request.NativeWebRequest request,
URI type)
default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> create(org.zalando.problem.StatusType status,
Throwable throwable,
org.springframework.web.context.request.NativeWebRequest request,
org.springframework.http.HttpHeaders headers,
URI type)
default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> create(org.zalando.problem.ThrowableProblem problem,
org.springframework.web.context.request.NativeWebRequest request)
default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> create(org.zalando.problem.ThrowableProblem problem,
org.springframework.web.context.request.NativeWebRequest request,
org.springframework.http.HttpHeaders headers)
default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> create(Throwable throwable, org.zalando.problem.Problem problem, org.springframework.web.context.request.NativeWebRequest request)
default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> create(Throwable throwable, org.zalando.problem.Problem problem, org.springframework.web.context.request.NativeWebRequest request, org.springframework.http.HttpHeaders headers)
default void log(Throwable throwable, org.zalando.problem.Problem problem, org.springframework.web.context.request.NativeWebRequest request, org.springframework.http.HttpStatus status)
default Optional<org.springframework.http.MediaType> negotiate(org.springframework.web.context.request.NativeWebRequest request)
default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> fallback(Throwable throwable, org.zalando.problem.Problem problem, org.springframework.web.context.request.NativeWebRequest request, org.springframework.http.HttpHeaders headers)
default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> process(org.springframework.http.ResponseEntity<org.zalando.problem.Problem> entity,
org.springframework.web.context.request.NativeWebRequest request)
Copyright © 2015–2020 Zalando SE. All rights reserved.