mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-30 10:54:06 +08:00
替换带代码里所有 fastjson 的内容,统一使用 jackson
不考虑使用 gson 的原因,是基本停止了维护
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package cn.iocoder.dashboard.framework.redis.config;
|
||||
|
||||
import cn.iocoder.dashboard.framework.redis.core.pubsub.AbstractChannelMessageListener;
|
||||
import com.alibaba.fastjson.support.spring.GenericFastJsonRedisSerializer;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@@ -29,7 +28,7 @@ public class RedisConfig {
|
||||
// 使用 String 序列化方式,序列化 KEY 。
|
||||
template.setKeySerializer(RedisSerializer.string());
|
||||
// 使用 JSON 序列化方式(库是 FastJSON ),序列化 VALUE 。
|
||||
template.setValueSerializer(new GenericFastJsonRedisSerializer());
|
||||
template.setValueSerializer(RedisSerializer.json());
|
||||
return template;
|
||||
}
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
package cn.iocoder.dashboard.framework.redis.core.pubsub;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
|
||||
/**
|
||||
* Redis Channel Message 接口
|
||||
@@ -12,7 +12,7 @@ public interface ChannelMessage {
|
||||
*
|
||||
* @return Channel
|
||||
*/
|
||||
@JSONField(serialize = false) // 必须序列化
|
||||
@JsonIgnore // 必须序列化
|
||||
String getChannel();
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user