Class FastJsonRedisSerializer<T>
java.lang.Object
com.alibaba.fastjson.support.spring.FastJsonRedisSerializer<T>
- All Implemented Interfaces:
org.springframework.data.redis.serializer.RedisSerializer<T>
public class FastJsonRedisSerializer<T>
extends Object
implements org.springframework.data.redis.serializer.RedisSerializer<T>
Fastjson for Spring Data Redis Serializer.
Compatible fastjson 1.2.x
- Since:
- 2.0.2
- Author:
- lihengming, Victor.Zxy
- See Also:
-
RedisSerializer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondeserialize
(byte[] bytes) byte[]
void
setFastJsonConfig
(FastJsonConfig fastJsonConfig) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.data.redis.serializer.RedisSerializer
canSerialize, getTargetType
-
Constructor Details
-
FastJsonRedisSerializer
-
-
Method Details
-
getFastJsonConfig
-
setFastJsonConfig
-
serialize
public byte[] serialize(T type) throws org.springframework.data.redis.serializer.SerializationException - Specified by:
serialize
in interfaceorg.springframework.data.redis.serializer.RedisSerializer<T>
- Throws:
org.springframework.data.redis.serializer.SerializationException
-
deserialize
public T deserialize(byte[] bytes) throws org.springframework.data.redis.serializer.SerializationException - Specified by:
deserialize
in interfaceorg.springframework.data.redis.serializer.RedisSerializer<T>
- Throws:
org.springframework.data.redis.serializer.SerializationException
-