Class RedisPubsubConfig

java.lang.Object
com.bytedesk.core.redis.pubsub.RedisPubsubConfig

@Configuration public class RedisPubsubConfig extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.data.redis.listener.RedisMessageListenerContainer
    container(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory, org.springframework.data.redis.listener.adapter.MessageListenerAdapter listener)
     
    org.springframework.data.redis.listener.adapter.MessageListenerAdapter
    消息监听器,使用MessageAdapter可实现自动化解码及方法代理 // FIXME: 编码报错 SerializationException: Could not read JSON: Unexpected character ('¬' (code 172)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
    (package private) org.springframework.data.redis.listener.RedisMessageListenerContainer
    redisKeyExpireListenerContainer(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory, RedisKeyExpirationListener listenerAdapter)
     
    (package private) org.springframework.data.redis.listener.RedisMessageListenerContainer
    redisMessageListenerContainer(org.springframework.data.redis.connection.RedisConnectionFactory redisConnectionFactory, RedisPubsubStringListener redisStringListener)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RedisPubsubConfig

      public RedisPubsubConfig()
  • Method Details

    • container

      @Bean public org.springframework.data.redis.listener.RedisMessageListenerContainer container(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory, org.springframework.data.redis.listener.adapter.MessageListenerAdapter listener)
    • listener

      @Bean public org.springframework.data.redis.listener.adapter.MessageListenerAdapter listener(RedisPubsubObjectListener subscriber)
      消息监听器,使用MessageAdapter可实现自动化解码及方法代理 // FIXME: 编码报错 SerializationException: Could not read JSON: Unexpected character ('¬' (code 172)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
      Returns:
    • redisMessageListenerContainer

      @Bean org.springframework.data.redis.listener.RedisMessageListenerContainer redisMessageListenerContainer(org.springframework.data.redis.connection.RedisConnectionFactory redisConnectionFactory, RedisPubsubStringListener redisStringListener)
    • redisKeyExpireListenerContainer

      @Bean org.springframework.data.redis.listener.RedisMessageListenerContainer redisKeyExpireListenerContainer(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory, RedisKeyExpirationListener listenerAdapter)