public interface 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,
RoutingAdviceTrait,
ValidationAdviceTrait| Modifier and Type | Field and Description |
|---|---|
static org.springframework.http.ResponseEntity<org.zalando.problem.Problem> |
NOT_ACCEPTABLE |
| Modifier and Type | Method and Description |
|---|---|
default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> |
create(javax.ws.rs.core.Response.StatusType status,
Throwable throwable,
org.springframework.web.context.request.NativeWebRequest request) |
default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> |
create(javax.ws.rs.core.Response.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> |
entity(org.zalando.problem.Problem problem,
org.springframework.web.context.request.NativeWebRequest request) |
default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> |
entity(org.zalando.problem.Problem problem,
org.springframework.web.context.request.NativeWebRequest request,
org.springframework.http.HttpHeaders headers) |
default boolean |
isCausalChainsEnabled() |
default Optional<org.springframework.http.MediaType> |
negotiate(org.springframework.web.context.request.NativeWebRequest request) |
default org.zalando.problem.ThrowableProblem |
toProblem(Throwable throwable,
javax.ws.rs.core.Response.StatusType status) |
static final org.springframework.http.ResponseEntity<org.zalando.problem.Problem> NOT_ACCEPTABLE
default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> create(javax.ws.rs.core.Response.StatusType status,
Throwable throwable,
org.springframework.web.context.request.NativeWebRequest request)
throws org.springframework.web.HttpMediaTypeNotAcceptableException
org.springframework.web.HttpMediaTypeNotAcceptableExceptiondefault org.springframework.http.ResponseEntity<org.zalando.problem.Problem> create(javax.ws.rs.core.Response.StatusType status,
Throwable throwable,
org.springframework.web.context.request.NativeWebRequest request,
org.springframework.http.HttpHeaders headers)
throws org.springframework.web.HttpMediaTypeNotAcceptableException
org.springframework.web.HttpMediaTypeNotAcceptableExceptiondefault org.zalando.problem.ThrowableProblem toProblem(Throwable throwable, javax.ws.rs.core.Response.StatusType status)
default boolean isCausalChainsEnabled()
default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> entity(org.zalando.problem.Problem problem,
org.springframework.web.context.request.NativeWebRequest request)
throws org.springframework.web.HttpMediaTypeNotAcceptableException
org.springframework.web.HttpMediaTypeNotAcceptableExceptiondefault org.springframework.http.ResponseEntity<org.zalando.problem.Problem> entity(org.zalando.problem.Problem problem,
org.springframework.web.context.request.NativeWebRequest request,
org.springframework.http.HttpHeaders headers)
throws org.springframework.web.HttpMediaTypeNotAcceptableException
org.springframework.web.HttpMediaTypeNotAcceptableExceptiondefault Optional<org.springframework.http.MediaType> negotiate(org.springframework.web.context.request.NativeWebRequest request) throws org.springframework.web.HttpMediaTypeNotAcceptableException
org.springframework.web.HttpMediaTypeNotAcceptableExceptionCopyright © 2015–2016 Zalando SE. All rights reserved.