From 1582f92a9952d12329c771029b96ed96aa35bad6 Mon Sep 17 00:00:00 2001 From: m2 Date: Fri, 22 Mar 2024 14:26:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dredis=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E8=AD=A6=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../net/dreamlu/mica/redis/config/RedisPubSubConfiguration.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mica-redis/src/main/java/net/dreamlu/mica/redis/config/RedisPubSubConfiguration.java b/mica-redis/src/main/java/net/dreamlu/mica/redis/config/RedisPubSubConfiguration.java index 06b751cd3..cf8b097a1 100644 --- a/mica-redis/src/main/java/net/dreamlu/mica/redis/config/RedisPubSubConfiguration.java +++ b/mica-redis/src/main/java/net/dreamlu/mica/redis/config/RedisPubSubConfiguration.java @@ -21,6 +21,7 @@ import net.dreamlu.mica.redis.pubsub.RPubSubListenerDetector; import net.dreamlu.mica.redis.pubsub.RedisPubSubPublisher; import org.springframework.boot.autoconfigure.AutoConfiguration; +import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.context.annotation.Bean; import org.springframework.data.redis.connection.RedisConnectionFactory; @@ -50,6 +51,7 @@ public RPubSubPublisher topicEventPublisher(MicaRedisCache redisCache, } @Bean + @ConditionalOnBean(RedisSerializer.class) public RPubSubListenerDetector topicListenerDetector(RedisMessageListenerContainer redisMessageListenerContainer, RedisSerializer redisSerializer) { return new RPubSubListenerDetector(redisMessageListenerContainer, redisSerializer);