ResponseBodyAdvice implementations
that customize the response before JSON serialization with
AbstractJackson2HttpMessageConverter's concrete subclasses.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final Object | beforeBodyWrite(Object
the body to be written body, MethodParameter the return type of the controller method returnType, MediaType the content type selected through content negotiation contentType, Class<? extends HttpMessageConverter<?>> the converter type selected to write to the response converterType, ServerHttpRequest the current request request, ServerHttpResponse the current response response)Implements org. Invoked after an |
| protected abstract void | beforeBodyWriteInternal(MappingJacksonValue bodyContainer, MediaType contentType, MethodParameter returnType, ServerHttpRequest request, ServerHttpResponse response)
Invoked only if the converter type is |
| protected MappingJacksonValue | getOrCreateContainer(Object body)
Wrap the body in a |
| public boolean | supports(MethodParameter
the return type returnType, Class<? extends HttpMessageConverter<?>> the selected converter type converterType)Implements org. Whether this component supports the given controller method return type
and the selected |
| AbstractMappingJacksonResponseBodyAdvice | back to summary |
|---|---|
| public AbstractMappingJacksonResponseBodyAdvice() | |
| beforeBodyWrite | back to summary |
|---|---|
| public final Object beforeBodyWrite(Object body, MethodParameter returnType, MediaType contentType, Class<? extends HttpMessageConverter<?>> converterType, ServerHttpRequest request, ServerHttpResponse response) Implements org. Doc from org. Invoked after an
| |
| beforeBodyWriteInternal | back to summary |
|---|---|
| protected abstract void beforeBodyWriteInternal(MappingJacksonValue bodyContainer, MediaType contentType, MethodParameter returnType, ServerHttpRequest request, ServerHttpResponse response) Invoked only if the converter type is | |
| getOrCreateContainer | back to summary |
|---|---|
| protected MappingJacksonValue getOrCreateContainer(Object body) Wrap the body in a | |
| supports | back to summary |
|---|---|
| public boolean supports(MethodParameter returnType, Class<? extends HttpMessageConverter<?>> converterType) Implements org. Doc from org. Whether this component supports the given controller method return type
and the selected
| |