@Requires(beans=JacksonConfiguration.class) @Requires(property="jackson.json-view.enabled") @Singleton @Internal @Primary public class JsonViewMediaTypeCodecFactory extends java.lang.Object implements JsonViewCodecResolver
MediaTypeCodec for JSON and Jackson using a specified
JsonView class.| Modifier | Constructor and Description |
|---|---|
protected |
JsonViewMediaTypeCodecFactory(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
ApplicationConfiguration applicationConfiguration,
CodecConfiguration codecConfiguration) |
| Modifier and Type | Method and Description |
|---|---|
JsonMediaTypeCodec |
resolveJsonViewCodec(java.lang.Class<?> viewClass)
Creates a
JsonMediaTypeCodec for the view class (specified as the JsonView annotation value). |
protected JsonViewMediaTypeCodecFactory(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
ApplicationConfiguration applicationConfiguration,
@Named(value="json") @Nullable
CodecConfiguration codecConfiguration)
objectMapper - To read/write JSONapplicationConfiguration - The common application configurationscodecConfiguration - The configuration for the codec@NonNull public JsonMediaTypeCodec resolveJsonViewCodec(@NonNull java.lang.Class<?> viewClass)
JsonMediaTypeCodec for the view class (specified as the JsonView annotation value).resolveJsonViewCodec in interface JsonViewCodecResolverviewClass - The view class