alibaba / fastjson2

🚄 FASTJSON2 is a Java JSON library with excellent performance.
Apache License 2.0
3.78k stars 495 forks source link

现在fastjson2还不支持SpringSession序列化吗 #393

Closed haonange1314 closed 2 years ago

haonange1314 commented 2 years ago

fastjson 1版本

@Bean
public RedisSerializer<Object> springSessionDefaultRedisSerializer() {
    return new GenericFastJsonRedisSerializer();
}

fastjson2该怎么使用呢?

wenshao commented 2 years ago

放到这里了:

import com.alibaba.fastjson2.support.spring.data.redis;

Fastjson Extension扩展模块

如果项目使用SpringFramework等框架,可以使用fastjson-extension模块,使用方式参考 SpringFramework Support

Maven:

<dependency>
    <groupId>com.alibaba.fastjson2</groupId>
    <artifactId>fastjson2-extension</artifactId>
    <version>2.0.5</version>
</dependency>
haonange1314 commented 2 years ago

嗯嗯、好嘞!非常感谢