Class Fastjson2Encoder

java.lang.Object
org.springframework.http.codec.json.Jackson2CodecSupport
org.springframework.http.codec.json.AbstractJackson2Encoder
com.alibaba.fastjson2.support.spring6.http.codec.Fastjson2Encoder
All Implemented Interfaces:
org.springframework.core.codec.Encoder<Object>, org.springframework.http.codec.HttpMessageEncoder<Object>

public class Fastjson2Encoder extends org.springframework.http.codec.json.AbstractJackson2Encoder
Fastjson2 for Spring WebFlux.
Author:
Xi.Liu
See Also:
  • AbstractJackson2Decoder
  • Field Summary

    Fields inherited from class org.springframework.http.codec.json.Jackson2CodecSupport

    JSON_VIEW_HINT, logger
  • Constructor Summary

    Constructors
    Constructor
    Description
    Fastjson2Encoder(com.fasterxml.jackson.databind.ObjectMapper mapper, FastJsonConfig config, org.springframework.util.MimeType... mimeTypes)
     
    Fastjson2Encoder(com.fasterxml.jackson.databind.ObjectMapper mapper, org.springframework.util.MimeType... mimeTypes)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.core.io.buffer.DataBuffer
    encodeValue(Object value, org.springframework.core.io.buffer.DataBufferFactory bufferFactory, org.springframework.core.ResolvableType valueType, org.springframework.util.MimeType mimeType, Map<String,Object> hints)
     

    Methods inherited from class org.springframework.http.codec.json.AbstractJackson2Encoder

    canEncode, customizeWriter, encode, getAnnotation, getEncodableMimeTypes, getEncodableMimeTypes, getEncodeHints, getJsonEncoding, getStreamingMediaTypes, getStreamingMediaTypeSeparator, setStreamingMediaTypes

    Methods inherited from class org.springframework.http.codec.json.Jackson2CodecSupport

    getHints, getJavaType, getMediaTypesForProblemDetail, getMimeTypes, getMimeTypes, getObjectMapper, getObjectMapperRegistrations, getObjectMappersForType, getParameter, logWarningIfNecessary, registerObjectMappersForType, selectObjectMapper, setObjectMapper, supportsMimeType

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Fastjson2Encoder

      public Fastjson2Encoder(com.fasterxml.jackson.databind.ObjectMapper mapper, org.springframework.util.MimeType... mimeTypes)
    • Fastjson2Encoder

      public Fastjson2Encoder(com.fasterxml.jackson.databind.ObjectMapper mapper, FastJsonConfig config, org.springframework.util.MimeType... mimeTypes)
  • Method Details

    • encodeValue

      @NonNull public org.springframework.core.io.buffer.DataBuffer encodeValue(@Nullable Object value, @NonNull org.springframework.core.io.buffer.DataBufferFactory bufferFactory, @NonNull org.springframework.core.ResolvableType valueType, org.springframework.util.MimeType mimeType, Map<String,Object> hints)
      Specified by:
      encodeValue in interface org.springframework.core.codec.Encoder<Object>
      Overrides:
      encodeValue in class org.springframework.http.codec.json.AbstractJackson2Encoder