package cn.iselab.mooctest.user.configure;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer;

/**
 * @Description: 作用描述
 * @Author: xuexb
 * @CreateDate: 19-1-28$ 下午4:36$
 */
public class CustomSessionDefaultRedisSerializer extends GenericJackson2JsonRedisSerializer {
    private static final Logger LOG = LoggerFactory.getLogger(CustomSessionDefaultRedisSerializer.class);

    @Override
    public Object deserialize(byte[] bytes) {
        Object deserialObj = null;
        try {
            deserialObj = super.deserialize(bytes);
        }catch (Exception e){
            LOG.warn("deserialize session Object error!", e);
        }
        return deserialObj;
    }
}
