@Requires(beans=JsonConfiguration.class) @Requires(classes=com.fasterxml.jackson.annotation.JsonView.class) @Requires(property="jackson.json-view.enabled") @Filter(value="/**") public class JsonViewServerFilter extends Object implements HttpServerFilter
Modifier and Type | Field and Description |
---|---|
static String |
PROPERTY_JSON_VIEW_ENABLED
Property used to specify whether JSON view is enabled.
|
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
JsonViewServerFilter(io.micronaut.http.server.netty.jackson.JsonViewCodecResolver jsonViewCodecResolver,
ExecutorService executorService) |
Modifier and Type | Method and Description |
---|---|
Publisher<MutableHttpResponse<?>> |
doFilter(HttpRequest<?> request,
ServerFilterChain chain)
Variation of the
HttpServerFilter.doFilter(HttpRequest, FilterChain) method that accepts a ServerFilterChain
which allows to mutate the outgoing HTTP response. |
int |
getOrder() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
doFilter
public static final String PROPERTY_JSON_VIEW_ENABLED
public JsonViewServerFilter(io.micronaut.http.server.netty.jackson.JsonViewCodecResolver jsonViewCodecResolver, @Named(value="io") ExecutorService executorService)
jsonViewCodecResolver
- The JSON view codec resolver.executorService
- The I/O executor servicepublic Publisher<MutableHttpResponse<?>> doFilter(HttpRequest<?> request, ServerFilterChain chain)
HttpServerFilter
HttpServerFilter.doFilter(HttpRequest, FilterChain)
method that accepts a ServerFilterChain
which allows to mutate the outgoing HTTP response.doFilter
in interface HttpServerFilter
request
- The requestchain
- The chainPublisher
that emits a MutableHttpResponse
HttpServerFilter.doFilter(HttpRequest, FilterChain)