接口 CodecConfigurer.DefaultCodecs
- 封闭接口:
- CodecConfigurer
public static interface CodecConfigurer.DefaultCodecs
Customize or replace the HTTP message readers and writers registered by default. The options are further extended byClientDefaultCodecs
andServerDefaultCodecs
.
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 void
enableLoggingRequestDetails(boolean enable)
Whether to log form data at DEBUG level, and headers at TRACE level.void
jackson2JsonDecoder(Decoder<?> decoder)
Override the default Jackson JSONDecoder
.void
jackson2JsonEncoder(Encoder<?> encoder)
Override the default Jackson JSONEncoder
.void
jackson2SmileDecoder(Decoder<?> decoder)
Override the default Jackson SmileDecoder
.void
jackson2SmileEncoder(Encoder<?> encoder)
Override the default Jackson SmileEncoder
.void
jaxb2Decoder(Decoder<?> decoder)
Override the default JAXB2Decoder
.void
jaxb2Encoder(Encoder<?> encoder)
Override the default JABX2Encoder
.void
maxInMemorySize(int byteCount)
Configure a limit on the number of bytes that can be buffered whenever the input stream needs to be aggregated.void
protobufDecoder(Decoder<?> decoder)
Override the default ProtobufDecoder
.void
protobufEncoder(Encoder<?> encoder)
Override the default ProtobufEncoder
.
方法详细资料
jackson2JsonDecoder
void jackson2JsonDecoder(Decoder<?> decoder)
Override the default Jackson JSONDecoder
.Note that
maxInMemorySize(int)
, if configured, will be applied to the given decoder.- 参数:
decoder
- the decoder instance to use- 另请参阅:
Jackson2JsonDecoder
jackson2JsonEncoder
void jackson2JsonEncoder(Encoder<?> encoder)
Override the default Jackson JSONEncoder
.- 参数:
encoder
- the encoder instance to use- 另请参阅:
Jackson2JsonEncoder
jackson2SmileDecoder
void jackson2SmileDecoder(Decoder<?> decoder)
Override the default Jackson SmileDecoder
.Note that
maxInMemorySize(int)
, if configured, will be applied to the given decoder.- 参数:
decoder
- the decoder instance to use- 另请参阅:
Jackson2SmileDecoder
jackson2SmileEncoder
void jackson2SmileEncoder(Encoder<?> encoder)
Override the default Jackson SmileEncoder
.- 参数:
encoder
- the encoder instance to use- 另请参阅:
Jackson2SmileEncoder
protobufDecoder
void protobufDecoder(Decoder<?> decoder)
Override the default ProtobufDecoder
.Note that
maxInMemorySize(int)
, if configured, will be applied to the given decoder.- 参数:
decoder
- the decoder instance to use- 从以下版本开始:
- 5.1
- 另请参阅:
ProtobufDecoder
protobufEncoder
void protobufEncoder(Encoder<?> encoder)
Override the default ProtobufEncoder
.- 参数:
encoder
- the encoder instance to use- 从以下版本开始:
- 5.1
- 另请参阅:
ProtobufEncoder
,ProtobufHttpMessageWriter
jaxb2Decoder
void jaxb2Decoder(Decoder<?> decoder)
Override the default JAXB2Decoder
.Note that
maxInMemorySize(int)
, if configured, will be applied to the given decoder.- 参数:
decoder
- the decoder instance to use- 从以下版本开始:
- 5.1.3
- 另请参阅:
Jaxb2XmlDecoder
jaxb2Encoder
void jaxb2Encoder(Encoder<?> encoder)
Override the default JABX2Encoder
.- 参数:
encoder
- the encoder instance to use- 从以下版本开始:
- 5.1.3
- 另请参阅:
Jaxb2XmlEncoder
maxInMemorySize
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 singleDataBuffer
,ByteBuffer
,byte[]
,Resource
,String
, etc. It can also occur when splitting the input stream, e.g. delimited text, in which case the limit applies to data buffered between delimiters.By default this is not set, in which case individual codec defaults apply. All codecs are limited to 256K by default.
- 参数:
byteCount
- the max number of bytes to buffer, or -1 for unlimited- 从以下版本开始:
- 5.1.11
enableLoggingRequestDetails
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
false
so that request details are not shown.- 参数:
enable
- whether to enable or not- 从以下版本开始:
- 5.1