接口 HttpMessageEncoder<T>

    • 方法详细资料

      • getStreamingMediaTypes

        List<MediaTypegetStreamingMediaTypes()
        Return "streaming" media types for which flushing should be performed automatically vs at the end of the input stream.
      • getEncodeHints

        default Map<String,​ObjectgetEncodeHints​(ResolvableType actualType,
                                                        ResolvableType elementType,
                                                        @Nullable
                                                        MediaType mediaType,
                                                        ServerHttpRequest request,
                                                        ServerHttpResponse response)
        Get decoding hints based on the server request or annotations on the target controller method parameter.
        参数:
        actualType - the actual source type to encode, possibly a reactive wrapper and sourced from MethodParameter, i.e. providing access to method annotations.
        elementType - the element type within Flux/Mono that we're trying to encode.
        request - the current request
        response - the current response
        返回:
        a Map with hints, possibly empty