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 Details

    • FastJsonRedisSerializer

      public FastJsonRedisSerializer(Class<T> type)
  • Method Details

    • getFastJsonConfig

      public FastJsonConfig getFastJsonConfig()
    • setFastJsonConfig

      public void setFastJsonConfig(FastJsonConfig fastJsonConfig)
    • serialize

      public byte[] serialize(T type) throws org.springframework.data.redis.serializer.SerializationException
      Specified by:
      serialize in interface org.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 interface org.springframework.data.redis.serializer.RedisSerializer<T>
      Throws:
      org.springframework.data.redis.serializer.SerializationException