一、配置Redis开启
打开conf/redis.conf 文件,添加参数:notify-keyspace-events Ex
二、验证配置
- 步骤一:进入redis客户端:redis-cli
- 步骤二:执行 CONFIG GET notify-keyspace-events ,如果有返回值证明配置成功,如果没有执行步骤三
- 步骤三:执行CONFIG SET notify-keyspace-events "Ex",再查看步骤二是否有值
三、两个类
一、配置Redis开启
打开conf/redis.conf 文件,添加参数:notify-keyspace-events Ex
二、验证配置
三、两个类