类 MultipartHttpMessageWriter

  • 所有已实现的接口:
    HttpMessageWriter<MultiValueMap<String,​?>>

    public class MultipartHttpMessageWriter
    extends LoggingCodecSupport
    implements HttpMessageWriter<MultiValueMap<String,​?>>
    HttpMessageWriter for writing a MultiValueMap<String, ?> as multipart form data, i.e. "multipart/form-data", to the body of a request.

    The serialization of individual parts is delegated to other writers. By default only String and Resource parts are supported but you can configure others through a constructor argument.

    This writer can be configured with a FormHttpMessageWriter to delegate to. It is the preferred way of supporting both form data and multipart data (as opposed to registering each writer separately) so that when the MediaType is not specified and generics are not present on the target element type, we can inspect the values in the actual map and decide whether to write plain form data (String values only) or otherwise.

    从以下版本开始:
    5.0
    作者:
    Sebastien Deleuze, Rossen Stoyanchev
    另请参阅:
    FormHttpMessageWriter