Class Fastjson2Decoder
java.lang.Object
org.springframework.core.codec.AbstractDecoder<Object>
com.alibaba.fastjson2.support.spring6.codec.Fastjson2Decoder
- All Implemented Interfaces:
org.springframework.core.codec.Decoder<Object>
spring message codec decoder for Fastjson2.
- Since:
- 2025/8/6
- Author:
- 张治保
-
Field Summary
Fields inherited from class org.springframework.core.codec.AbstractDecoder
logger -
Constructor Summary
ConstructorsConstructorDescriptiondefault constructorFastjson2Decoder(FastJsonConfig config, org.springframework.util.MimeType... mimeTypes) Constructor with custom configs -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Flux<Object> decode(org.reactivestreams.Publisher<org.springframework.core.io.buffer.DataBuffer> inputStream, org.springframework.core.ResolvableType elementType, org.springframework.util.MimeType mimeType, Map<String, Object> hints) decode(org.springframework.core.io.buffer.DataBuffer buffer, org.springframework.core.ResolvableType targetType, org.springframework.util.MimeType mimeType, Map<String, Object> hints) reactor.core.publisher.Mono<Object> decodeToMono(org.reactivestreams.Publisher<org.springframework.core.io.buffer.DataBuffer> inputStream, org.springframework.core.ResolvableType elementType, org.springframework.util.MimeType mimeType, Map<String, Object> hints) Methods inherited from class org.springframework.core.codec.AbstractDecoder
canDecode, getDecodableMimeTypes, getLogger, setLoggerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.core.codec.Decoder
getDecodableMimeTypes
-
Constructor Details
-
Fastjson2Decoder
public Fastjson2Decoder()default constructor -
Fastjson2Decoder
Constructor with custom configs- Parameters:
config- FastJsonConfigmimeTypes- the mime types to support
-
-
Method Details
-
decode
@NonNull public reactor.core.publisher.Flux<Object> decode(@NonNull org.reactivestreams.Publisher<org.springframework.core.io.buffer.DataBuffer> inputStream, @NonNull org.springframework.core.ResolvableType elementType, @Nullable org.springframework.util.MimeType mimeType, @Nullable Map<String, Object> hints) -
decode
@Nullable public Object decode(@NonNull org.springframework.core.io.buffer.DataBuffer buffer, @NonNull org.springframework.core.ResolvableType targetType, org.springframework.util.MimeType mimeType, Map<String, Object> hints) throws org.springframework.core.codec.DecodingException- Throws:
org.springframework.core.codec.DecodingException
-
decodeToMono
@NonNull public reactor.core.publisher.Mono<Object> decodeToMono(@NonNull org.reactivestreams.Publisher<org.springframework.core.io.buffer.DataBuffer> inputStream, @NonNull org.springframework.core.ResolvableType elementType, @Nullable org.springframework.util.MimeType mimeType, @Nullable Map<String, Object> hints)
-