jjzjj

RedisMessageListenerContainer

全部标签

redis - spring data redis - 监听过期事件

我想用KeyExpirationEventMessageListener监听过期事件,但找不到示例。有人知道如何使用Springboot1.4.3和SpringDataRedis做到这一点吗?我正在做这个JedisPoolpool=newJedisPool(newJedisPoolConfig(),"localhost");this.jedis=pool.getResource();this.jedis.psubscribe(newJedisPubSub(){@OverridepublicvoidonPMessage(Stringpattern,Stringchannel,String

redis - spring data redis - 监听过期事件

我想用KeyExpirationEventMessageListener监听过期事件,但找不到示例。有人知道如何使用Springboot1.4.3和SpringDataRedis做到这一点吗?我正在做这个JedisPoolpool=newJedisPool(newJedisPoolConfig(),"localhost");this.jedis=pool.getResource();this.jedis.psubscribe(newJedisPubSub(){@OverridepublicvoidonPMessage(Stringpattern,Stringchannel,String