Class JsonViewServerFilter
java.lang.Object
io.micronaut.http.server.netty.jackson.JsonViewServerFilter
- All Implemented Interfaces:
Ordered
@Requires(beans=JsonConfiguration.class) @Requires(classes=com.fasterxml.jackson.annotation.JsonView.class) @Requires(property="jackson.json-view.enabled")
@ServerFilter("/**")
@Internal
public class JsonViewServerFilter
extends Object
implements Ordered
Jackson @JsonView filter.
- Since:
- 1.1
- Author:
- mmindenhall, graemerocher
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Property used to specify whether JSON view is enabled.Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorDescriptionJsonViewServerFilter
(io.micronaut.http.server.netty.jackson.JsonViewCodecResolver jsonViewCodecResolver, ExecutorService executorService, ConversionService conversionService) -
Method Summary
Modifier and TypeMethodDescriptionfinal Publisher<? extends MutableHttpResponse<?>>
doFilter
(HttpRequest<?> request, MutableHttpResponse<?> response) int
getOrder()
-
Field Details
-
PROPERTY_JSON_VIEW_ENABLED
Property used to specify whether JSON view is enabled.- See Also:
-
-
Constructor Details
-
JsonViewServerFilter
public JsonViewServerFilter(io.micronaut.http.server.netty.jackson.JsonViewCodecResolver jsonViewCodecResolver, @Named("blocking") ExecutorService executorService, ConversionService conversionService) - Parameters:
jsonViewCodecResolver
- The JSON view codec resolver.executorService
- The I/O executor serviceconversionService
- The conversion service
-
-
Method Details
-
doFilter
@ResponseFilter public final Publisher<? extends MutableHttpResponse<?>> doFilter(HttpRequest<?> request, MutableHttpResponse<?> response) -
getOrder
public int getOrder()
-