接口的使用
org.springframework.core.codec.Encoder
使用Encoder的程序包 程序包 说明 org.springframework.core.codec org.springframework.http.codec org.springframework.http.codec.cbor org.springframework.http.codec.json JSON encoder and decoder support.org.springframework.http.codec.protobuf Provides an encoder and a decoder for Google Protocol Buffers.org.springframework.http.codec.xml XML encoder and decoder support.org.springframework.messaging.handler.invocation.reactive Common infrastructure for invoking message handler methods with non-blocking, and reactive contracts.org.springframework.messaging.rsocket Support for the RSocket protocol.org.springframework.messaging.rsocket.annotation.support Support classes for working with annotated RSocket stream handling methods.org.springframework.web.reactive.result.view Support for result handling through view resolution.org.springframework.core.codec中Encoder的使用
实现Encoder的org.springframework.core.codec中的类 修饰符和类型 类 说明 class
AbstractEncoder<T>
Abstract base class forDecoder
implementations.class
AbstractSingleValueEncoder<T>
Abstract base class forEncoder
classes that can only deal with a single value.class
ByteArrayEncoder
Encoder forbyte
arrays.class
ByteBufferEncoder
Encoder forByteBuffers
.class
CharSequenceEncoder
Encode from aCharSequence
stream to a bytes stream.class
DataBufferEncoder
Simple pass-through encoder forDataBuffers
.class
ResourceEncoder
Encoder forResources
.class
ResourceRegionEncoder
Encoder forResourceRegions
.org.springframework.http.codec中Encoder的使用
org.springframework.http.codec中Encoder的子接口 修饰符和类型 接口 说明 interface
HttpMessageEncoder<T>
Extension ofEncoder
exposing extra methods relevant in the context of HTTP request or response body encoding.返回Encoder的org.springframework.http.codec中的方法 修饰符和类型 方法 说明 Encoder<T>
EncoderHttpMessageWriter. getEncoder()
Return theEncoder
of this writer.Encoder<?>
ServerSentEventHttpMessageWriter. getEncoder()
Return the configuredEncoder
, if any.参数类型为Encoder的org.springframework.http.codec中的方法 修饰符和类型 方法 说明 ClientCodecConfigurer.MultipartCodecs
ClientCodecConfigurer.MultipartCodecs. encoder(Encoder<?> encoder)
Add a PartEncoder
, internally wrapped withEncoderHttpMessageWriter
.void
CodecConfigurer.CustomCodecs. encoder(Encoder<?> encoder)
已过时。as of 5.1.13, useCodecConfigurer.CustomCodecs.register(Object)
orCodecConfigurer.CustomCodecs.registerWithDefaultConfig(Object)
instead.void
CodecConfigurer.DefaultCodecs. jackson2JsonEncoder(Encoder<?> encoder)
Override the default Jackson JSONEncoder
.void
CodecConfigurer.DefaultCodecs. jackson2SmileEncoder(Encoder<?> encoder)
Override the default Jackson SmileEncoder
.void
CodecConfigurer.DefaultCodecs. jaxb2Encoder(Encoder<?> encoder)
Override the default JABX2Encoder
.void
CodecConfigurer.DefaultCodecs. protobufEncoder(Encoder<?> encoder)
Override the default ProtobufEncoder
.void
ServerCodecConfigurer.ServerDefaultCodecs. serverSentEventEncoder(Encoder<?> encoder)
Configure theEncoder
to use for Server-Sent Events.参数类型为Encoder的org.springframework.http.codec中的构造器 构造器 说明 EncoderHttpMessageWriter(Encoder<T> encoder)
Create an instance wrapping the givenEncoder
.ServerSentEventHttpMessageWriter(Encoder<?> encoder)
Constructor with JSONEncoder
for encoding objects.org.springframework.http.codec.cbor中Encoder的使用
实现Encoder的org.springframework.http.codec.cbor中的类 修饰符和类型 类 说明 class
Jackson2CborEncoder
Encode from anObject
to bytes of CBOR objects using Jackson.org.springframework.http.codec.json中Encoder的使用
实现Encoder的org.springframework.http.codec.json中的类 修饰符和类型 类 说明 class
AbstractJackson2Encoder
Base class providing support methods for Jackson 2.9 encoding.class
Jackson2JsonEncoder
Encode from anObject
stream to a byte stream of JSON objects using Jackson 2.9.class
Jackson2SmileEncoder
Encode from anObject
stream to a byte stream of Smile objects using Jackson 2.9.org.springframework.http.codec.protobuf中Encoder的使用
实现Encoder的org.springframework.http.codec.protobuf中的类 修饰符和类型 类 说明 class
ProtobufEncoder
参数类型为Encoder的org.springframework.http.codec.protobuf中的构造器 构造器 说明 ProtobufHttpMessageWriter(Encoder<com.google.protobuf.Message> encoder)
Create a newProtobufHttpMessageWriter
with the given encoder.org.springframework.http.codec.xml中Encoder的使用
实现Encoder的org.springframework.http.codec.xml中的类 修饰符和类型 类 说明 class
Jaxb2XmlEncoder
Encode from single value to a byte stream containing XML elements.org.springframework.messaging.handler.invocation.reactive中Encoder的使用
返回变量类型为Encoder的类型的org.springframework.messaging.handler.invocation.reactive中的方法 修饰符和类型 方法 说明 List<Encoder<?>>
AbstractEncoderMethodReturnValueHandler. getEncoders()
The configured encoders.类型变量类型为Encoder的org.springframework.messaging.handler.invocation.reactive中的构造器参数 构造器 说明 AbstractEncoderMethodReturnValueHandler(List<Encoder<?>> encoders, ReactiveAdapterRegistry registry)
org.springframework.messaging.rsocket中Encoder的使用
返回Encoder的org.springframework.messaging.rsocket中的方法 修饰符和类型 方法 说明 default <T> Encoder<T>
RSocketStrategies. encoder(ResolvableType elementType, MimeType mimeType)
Find a compatible Encoder for the given element type.返回变量类型为Encoder的类型的org.springframework.messaging.rsocket中的方法 修饰符和类型 方法 说明 List<Encoder<?>>
RSocketStrategies. encoders()
Return the configuredencoders
.参数类型为Encoder的org.springframework.messaging.rsocket中的方法 修饰符和类型 方法 说明 RSocketStrategies.Builder
RSocketStrategies.Builder. encoder(Encoder<?>... encoder)
Append to the list of encoders to use for serializing Objects to the data or metadata of aPayload
.类型变量类型为Encoder的org.springframework.messaging.rsocket中的方法参数 修饰符和类型 方法 说明 RSocketStrategies.Builder
RSocketStrategies.Builder. encoders(Consumer<List<Encoder<?>>> consumer)
Apply the consumer to the list of configured encoders, immediately.org.springframework.messaging.rsocket.annotation.support中Encoder的使用
返回变量类型为Encoder的类型的org.springframework.messaging.rsocket.annotation.support中的方法 修饰符和类型 方法 说明 List<? extends Encoder<?>>
RSocketMessageHandler. getEncoders()
Return the configuredencoders
.类型变量类型为Encoder的org.springframework.messaging.rsocket.annotation.support中的方法参数 修饰符和类型 方法 说明 void
RSocketMessageHandler. setEncoders(List<? extends Encoder<?>> encoders)
Configure the encoders to use for encoding handler method return values.类型变量类型为Encoder的org.springframework.messaging.rsocket.annotation.support中的构造器参数 构造器 说明 RSocketPayloadReturnValueHandler(List<Encoder<?>> encoders, ReactiveAdapterRegistry registry)
org.springframework.web.reactive.result.view中Encoder的使用
参数类型为Encoder的org.springframework.web.reactive.result.view中的构造器 构造器 说明 HttpMessageWriterView(Encoder<?> encoder)
Constructor with anEncoder
.