接口的使用
org.springframework.http.codec.HttpMessageWriter
使用HttpMessageWriter的程序包 程序包 说明 org.springframework.http.codec org.springframework.http.codec.multipart Multipart support.org.springframework.http.codec.protobuf Provides an encoder and a decoder for Google Protocol Buffers.org.springframework.web.reactive.function Provides a foundation for both the reactive client and server subpackages.org.springframework.web.reactive.function.client Provides a reactiveWebClient
that builds on top of theorg.springframework.http.client.reactive
reactive HTTP adapter layer.org.springframework.web.reactive.function.server Provides the types that make up Spring's functional web framework for Reactive environments.org.springframework.web.reactive.function.server.support Classes supporting theorg.springframework.web.reactive.function.server
package.org.springframework.web.reactive.result.method.annotation Infrastructure for annotation-based handler method processing.org.springframework.web.reactive.result.view Support for result handling through view resolution.org.springframework.http.codec中HttpMessageWriter的使用
实现HttpMessageWriter的org.springframework.http.codec中的类 修饰符和类型 类 说明 class
EncoderHttpMessageWriter<T>
HttpMessageWriter
that wraps and delegates to anEncoder
.class
FormHttpMessageWriter
HttpMessageWriter
for writing aMultiValueMap<String, String>
as HTML form data, i.e.class
ResourceHttpMessageWriter
HttpMessageWriter
that can write aResource
.class
ServerSentEventHttpMessageWriter
HttpMessageWriter
for"text/event-stream"
responses.返回变量类型为HttpMessageWriter的类型的org.springframework.http.codec中的方法 修饰符和类型 方法 说明 List<HttpMessageWriter<?>>
CodecConfigurer. getWriters()
Obtain the configured HTTP message writers.参数类型为HttpMessageWriter的org.springframework.http.codec中的方法 修饰符和类型 方法 说明 ClientCodecConfigurer.MultipartCodecs
ClientCodecConfigurer.MultipartCodecs. writer(HttpMessageWriter<?> writer)
Add a PartHttpMessageWriter
.void
CodecConfigurer.CustomCodecs. writer(HttpMessageWriter<?> writer)
已过时。as of 5.1.13, useCodecConfigurer.CustomCodecs.register(Object)
orCodecConfigurer.CustomCodecs.registerWithDefaultConfig(Object)
instead.org.springframework.http.codec.multipart中HttpMessageWriter的使用
实现HttpMessageWriter的org.springframework.http.codec.multipart中的类 修饰符和类型 类 说明 class
MultipartHttpMessageWriter
HttpMessageWriter
for writing aMultiValueMap<String, ?>
as multipart form data, i.e.返回HttpMessageWriter的org.springframework.http.codec.multipart中的方法 修饰符和类型 方法 说明 HttpMessageWriter<MultiValueMap<String,String>>
MultipartHttpMessageWriter. getFormWriter()
Return the configured form writer.返回变量类型为HttpMessageWriter的类型的org.springframework.http.codec.multipart中的方法 修饰符和类型 方法 说明 List<HttpMessageWriter<?>>
MultipartHttpMessageWriter. getPartWriters()
Return the configured part writers.参数类型为HttpMessageWriter的org.springframework.http.codec.multipart中的构造器 构造器 说明 MultipartHttpMessageWriter(List<HttpMessageWriter<?>> partWriters, HttpMessageWriter<MultiValueMap<String,String>> formWriter)
Constructor with explicit list of writers for serializing parts and a writer for plain form data to fall back when no media type is specified and the actual map consists of String values only.类型变量类型为HttpMessageWriter的org.springframework.http.codec.multipart中的构造器参数 构造器 说明 MultipartHttpMessageWriter(List<HttpMessageWriter<?>> partWriters)
Constructor with explicit list of writers for serializing parts.MultipartHttpMessageWriter(List<HttpMessageWriter<?>> partWriters, HttpMessageWriter<MultiValueMap<String,String>> formWriter)
Constructor with explicit list of writers for serializing parts and a writer for plain form data to fall back when no media type is specified and the actual map consists of String values only.org.springframework.http.codec.protobuf中HttpMessageWriter的使用
实现HttpMessageWriter的org.springframework.http.codec.protobuf中的类 修饰符和类型 类 说明 class
ProtobufHttpMessageWriter
HttpMessageWriter
that can write a protobufMessage
and addsX-Protobuf-Schema
,X-Protobuf-Message
headers and adelimited=true
parameter is added to the content type if a flux is serialized.org.springframework.web.reactive.function中HttpMessageWriter的使用
返回变量类型为HttpMessageWriter的类型的org.springframework.web.reactive.function中的方法 修饰符和类型 方法 说明 List<HttpMessageWriter<?>>
BodyInserter.Context. messageWriters()
Return theHttpMessageWriters
to be used for response body conversion.org.springframework.web.reactive.function.client中HttpMessageWriter的使用
返回变量类型为HttpMessageWriter的类型的org.springframework.web.reactive.function.client中的方法 修饰符和类型 方法 说明 List<HttpMessageWriter<?>>
ExchangeStrategies. messageWriters()
ReturnHttpMessageWriters
to write and encode the request body with.org.springframework.web.reactive.function.server中HttpMessageWriter的使用
返回变量类型为HttpMessageWriter的类型的org.springframework.web.reactive.function.server中的方法 修饰符和类型 方法 说明 List<HttpMessageWriter<?>>
HandlerStrategies. messageWriters()
Return theHttpMessageWriters
to be used for response body conversion.List<HttpMessageWriter<?>>
ServerResponse.Context. messageWriters()
Return theHttpMessageWriters
to be used for response body conversion.org.springframework.web.reactive.function.server.support中HttpMessageWriter的使用
类型变量类型为HttpMessageWriter的org.springframework.web.reactive.function.server.support中的方法参数 修饰符和类型 方法 说明 void
ServerResponseResultHandler. setMessageWriters(List<HttpMessageWriter<?>> configurer)
Configure HTTP message writers to serialize the request body with.org.springframework.web.reactive.result.method.annotation中HttpMessageWriter的使用
返回变量类型为HttpMessageWriter的类型的org.springframework.web.reactive.result.method.annotation中的方法 修饰符和类型 方法 说明 List<HttpMessageWriter<?>>
AbstractMessageWriterResultHandler. getMessageWriters()
Return the configured message converters.org.springframework.web.reactive.result.view中HttpMessageWriter的使用
返回HttpMessageWriter的org.springframework.web.reactive.result.view中的方法 修饰符和类型 方法 说明 HttpMessageWriter<?>
HttpMessageWriterView. getMessageWriter()
Return the configured message writer.参数类型为HttpMessageWriter的org.springframework.web.reactive.result.view中的构造器 构造器 说明 HttpMessageWriterView(HttpMessageWriter<?> writer)
Constructor with a fully initializedHttpMessageWriter
.