ClientCodecConfigurer#create() or
ServerCodecConfigurer#create() to create an instance.
defaultCodecs() to customize HTTP message readers or writers
registered by default.
customCodecs() to add custom HTTP message readers or writers.
getReaders() and getWriters() to obtain the list of
configured HTTP message readers and writers.
HTTP message readers and writers are divided into 3 categories that are ordered as follows:
Typed and object readers are further subdivided and ordered as follows:
| Modifier and Type | Class and Description |
|---|---|
| public static interface | CodecConfigurer.CustomCodecs
Registry for custom HTTP message readers and writers. |
| public static interface | CodecConfigurer.DefaultCodecConfig
Exposes the values of properties configured through
|
| public static interface | CodecConfigurer.DefaultCodecs
Customize or replace the HTTP message readers and writers registered by default. |
| public static interface | CodecConfigurer.MultipartCodecs
Registry and container for multipart HTTP message writers. |
| Modifier and Type | Method and Description |
|---|---|
| public CodecConfigurer | |
| public CodecConfigurer. | customCodecs()
Register custom HTTP message readers or writers in addition to the ones registered by default. |
| public CodecConfigurer. | defaultCodecs()
Provides a way to customize or replace HTTP message readers and writers registered by default. |
| public List | |
| public List | |
| public void | registerDefaults(boolean registerDefaults)
Provides a way to completely turn off registration of default HTTP message
readers and writers, and instead rely only on the ones provided via
|
| clone | back to summary |
|---|---|
| public CodecConfigurer clone() Create a copy of this
| |
| customCodecs | back to summary |
|---|---|
| public CodecConfigurer. Register custom HTTP message readers or writers in addition to the ones registered by default. | |
| defaultCodecs | back to summary |
|---|---|
| public CodecConfigurer. Provides a way to customize or replace HTTP message readers and writers registered by default.
| |
| getReaders | back to summary |
|---|---|
| public List Obtain the configured HTTP message readers. | |
| getWriters | back to summary |
|---|---|
| public List Obtain the configured HTTP message writers. | |
| registerDefaults | back to summary |
|---|---|
| public void registerDefaults(boolean registerDefaults) Provides a way to completely turn off registration of default HTTP message
readers and writers, and instead rely only on the ones provided via
By default this is set to | |
| Modifier and Type | Method and Description |
|---|---|
| public void | decoder(Decoder<?>
the decoder to add decoder)
Deprecated
as of 5.1.13, use
Add a custom register(Object) or
registerWithDefaultConfig(Object) instead.
Decoder internally wrapped with
DecoderHttpMessageReader).
|
| public void | encoder(Encoder<?>
the encoder to add encoder)
Deprecated
as of 5.1.13, use
Add a custom register(Object) or
registerWithDefaultConfig(Object) instead.
Encoder, internally wrapped with
EncoderHttpMessageWriter.
|
| public void | reader(HttpMessageReader<?>
the reader to add reader)
Deprecated
as of 5.1.13, use
Add a custom register(Object) or
registerWithDefaultConfig(Object) instead.
HttpMessageReader.
|
| public void | |
| public void | registerWithDefaultConfig(Object
the codec to register and apply default config to codec)Variant of |
| public void | registerWithDefaultConfig(Object
the codec to register codec, Consumer<CodecConfigurer.consumer of the default config configConsumerVariant of |
| public void | withDefaultCodecConfig(Consumer<CodecConfigurer.
the default codecs configuration callback codecsConfigConsumer
Deprecated
as of 5.1.13, use
Register a callback for the registerWithDefaultConfig(Object)
or registerWithDefaultConfig(Object, Consumer) instead.
configuration
applied to default codecs.
|
| public void | writer(HttpMessageWriter<?>
the writer to add writer)
Deprecated
as of 5.1.13, use
Add a custom register(Object) or
registerWithDefaultConfig(Object) instead.
HttpMessageWriter.
|
| decoder | back to summary |
|---|---|
| public void decoder(Decoder<?> decoder)
Deprecated as of 5.1.13, use Add a custom
| |
| encoder | back to summary |
|---|---|
| public void encoder(Encoder<?> encoder)
Deprecated as of 5.1.13, use Add a custom
| |
| reader | back to summary |
|---|---|
| public void reader(HttpMessageReader<?> reader)
Deprecated as of 5.1.13, use Add a custom
| |
| register | back to summary |
|---|---|
| public void register(Object codec) Register a custom codec. This is expected to be one of the following:
| |
| registerWithDefaultConfig | back to summary |
|---|---|
| public void registerWithDefaultConfig(Object codec) Variant of The properties are applied every time
| |
| registerWithDefaultConfig | back to summary |
|---|---|
| public void registerWithDefaultConfig(Object codec, Consumer<CodecConfigurer. Variant of The consumer is called every time
| |
| withDefaultCodecConfig | back to summary |
|---|---|
| public void withDefaultCodecConfig(Consumer<CodecConfigurer. Deprecated as of 5.1.13, use Register a callback for the
| |
| writer | back to summary |
|---|---|
| public void writer(HttpMessageWriter<?> writer)
Deprecated as of 5.1.13, use Add a custom
| |
defaultCodecs() that are applied to default codecs.
The main purpose of this interface is to provide access to them so they
can also be applied to custom codecs if needed.
CustomCodecs#registerWithDefaultConfig(Object, Consumer)
| Modifier and Type | Method and Description |
|---|---|
| public Boolean | |
| public Integer | maxInMemorySize()
Get the configured limit on the number of bytes that can be buffered whenever the input stream needs to be aggregated. |
| isEnableLoggingRequestDetails | back to summary |
|---|---|
| public Boolean isEnableLoggingRequestDetails() Whether to log form data at DEBUG level, and headers at TRACE level. Both may contain sensitive information.
| |
| maxInMemorySize | back to summary |
|---|---|
| public Integer maxInMemorySize() Get the configured limit on the number of bytes that can be buffered whenever the input stream needs to be aggregated.
| |
ClientDefaultCodecs and
ServerDefaultCodecs.
| Modifier and Type | Method and Description |
|---|---|
| public void | configureDefaultCodec(Consumer<Object>
the consumer to apply codecConsumer)Register a consumer to apply to default config instances. |
| public void | enableLoggingRequestDetails(boolean
whether to enable or not enable)Whether to log form data at DEBUG level, and headers at TRACE level. |
| public void | jackson2JsonDecoder(Decoder<?>
the decoder instance to use decoder)Override the default Jackson JSON |
| public void | jackson2JsonEncoder(Encoder<?>
the encoder instance to use encoder)Override the default Jackson JSON |
| public void | jackson2SmileDecoder(Decoder<?>
the decoder instance to use decoder)Override the default Jackson Smile |
| public void | jackson2SmileEncoder(Encoder<?>
the encoder instance to use encoder)Override the default Jackson Smile |
| public void | |
| public void | |
| public void | kotlinSerializationCborDecoder(Decoder<?>
the decoder instance to use decoder)Override the default Kotlin Serialization CBOR |
| public void | kotlinSerializationCborEncoder(Encoder<?>
the encoder instance to use encoder)Override the default Kotlin Serialization CBOR |
| public void | kotlinSerializationJsonDecoder(Decoder<?>
the decoder instance to use decoder)Override the default Kotlin Serialization JSON |
| public void | kotlinSerializationJsonEncoder(Encoder<?>
the encoder instance to use encoder)Override the default Kotlin Serialization JSON |
| public void | kotlinSerializationProtobufDecoder(Decoder<?>
the decoder instance to use decoder)Override the default Kotlin Serialization Protobuf |
| public void | kotlinSerializationProtobufEncoder(Encoder<?>
the encoder instance to use encoder)Override the default Kotlin Serialization Protobuf |
| public void | maxInMemorySize(int
the max number of bytes to buffer, or -1 for unlimited byteCount)Configure a limit on the number of bytes that can be buffered whenever the input stream needs to be aggregated. |
| public CodecConfigurer. | |
| public void | multipartReader(HttpMessageReader<?>
the message reader to use for multipart requests. reader)Configure the |
| public void | protobufDecoder(Decoder<?>
the decoder instance to use decoder)Override the default Protobuf |
| public void | protobufEncoder(Encoder<?>
the encoder instance to use encoder)Override the default Protobuf |
| configureDefaultCodec | back to summary |
|---|---|
| public void configureDefaultCodec(Consumer<Object> codecConsumer) Register a consumer to apply to default config instances. This can be
used to configure rather than replace a specific codec or multiple
codecs. The consumer is applied to every default | |
| enableLoggingRequestDetails | back to summary |
|---|---|
| public void enableLoggingRequestDetails(boolean enable) Whether to log form data at DEBUG level, and headers at TRACE level. Both may contain sensitive information. By default set to
| |
| jackson2JsonDecoder | back to summary |
|---|---|
| public void jackson2JsonDecoder(Decoder<?> decoder) Override the default Jackson JSON Note that
| |
| jackson2JsonEncoder | back to summary |
|---|---|
| public void jackson2JsonEncoder(Encoder<?> encoder) Override the default Jackson JSON
| |
| jackson2SmileDecoder | back to summary |
|---|---|
| public void jackson2SmileDecoder(Decoder<?> decoder) Override the default Jackson Smile Note that
| |
| jackson2SmileEncoder | back to summary |
|---|---|
| public void jackson2SmileEncoder(Encoder<?> encoder) Override the default Jackson Smile
| |
| jaxb2Decoder | back to summary |
|---|---|
| public void jaxb2Decoder(Decoder<?> decoder) Override the default JAXB2 Note that
| |
| jaxb2Encoder | back to summary |
|---|---|
| public void jaxb2Encoder(Encoder<?> encoder) Override the default JABX2
| |
| kotlinSerializationCborDecoder | back to summary |
|---|---|
| public void kotlinSerializationCborDecoder(Decoder<?> decoder) Override the default Kotlin Serialization CBOR
| |
| kotlinSerializationCborEncoder | back to summary |
|---|---|
| public void kotlinSerializationCborEncoder(Encoder<?> encoder) Override the default Kotlin Serialization CBOR
| |
| kotlinSerializationJsonDecoder | back to summary |
|---|---|
| public void kotlinSerializationJsonDecoder(Decoder<?> decoder) Override the default Kotlin Serialization JSON
| |
| kotlinSerializationJsonEncoder | back to summary |
|---|---|
| public void kotlinSerializationJsonEncoder(Encoder<?> encoder) Override the default Kotlin Serialization JSON
| |
| kotlinSerializationProtobufDecoder | back to summary |
|---|---|
| public void kotlinSerializationProtobufDecoder(Decoder<?> decoder) Override the default Kotlin Serialization Protobuf
| |
| kotlinSerializationProtobufEncoder | back to summary |
|---|---|
| public void kotlinSerializationProtobufEncoder(Encoder<?> encoder) Override the default Kotlin Serialization Protobuf
| |
| maxInMemorySize | back to summary |
|---|---|
| public void maxInMemorySize(int byteCount) Configure a limit on the number of bytes that can be buffered whenever
the input stream needs to be aggregated. This can be a result of
decoding to a single By default this is not set, in which case individual codec defaults apply. All codecs are limited to 256K by default.
| |
| multipartCodecs | back to summary |
|---|---|
| public CodecConfigurer. Configure encoders or writers for use with
| |
| multipartReader | back to summary |
|---|---|
| public void multipartReader(HttpMessageReader<?> reader) Configure the Note that
| |
| protobufDecoder | back to summary |
|---|---|
| public void protobufDecoder(Decoder<?> decoder) Override the default Protobuf Note that
| |
| protobufEncoder | back to summary |
|---|---|
| public void protobufEncoder(Encoder<?> encoder) Override the default Protobuf
| |
| Modifier and Type | Method and Description |
|---|---|
| public CodecConfigurer. | encoder(Encoder<?>
the encoder to add encoder)Add a Part |
| public CodecConfigurer. |
| encoder | back to summary |
|---|---|
| public CodecConfigurer. Add a Part
| |
| writer | back to summary |
|---|---|
| public CodecConfigurer. Add a Part
| |