Skip to content

Commit

Permalink
!32 修复redis启动警告
Browse files Browse the repository at this point in the history
Merge pull request !32 from mymx2/fix/redis-warn
  • Loading branch information
ChunMengLu authored and gitee-org committed Mar 22, 2024
2 parents 7225612 + 1582f92 commit 1f452d2
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -50,6 +51,7 @@ public RPubSubPublisher topicEventPublisher(MicaRedisCache redisCache,
}

@Bean
@ConditionalOnBean(RedisSerializer.class)
public RPubSubListenerDetector topicListenerDetector(RedisMessageListenerContainer redisMessageListenerContainer,
RedisSerializer<Object> redisSerializer) {
return new RPubSubListenerDetector(redisMessageListenerContainer, redisSerializer);
Expand Down

0 comments on commit 1f452d2

Please sign in to comment.