查看redis配置

 CONFIG 命令查看或设置配置项。
 CONFIG get * 所有的
 CONFIG get XXX
 CONFIG set XXX YYY (设置XXX = YYY)

示例

#设置配置
config set notify-keyspace-events Egx
#查看配置
config get notify-keyspace-events
#客户端方式
redis-cli config set notify-keyspace-events Egx
#
redis-cli config get notify-keyspace-events

#重启redis配置生效

note(小问题)

Error creating bean with name 'enableRedisKeyspaceNotificationsInitializer' defined in class path resource

在spring boot中,我们使用了注解:@EnableRedisHttpSession,这个注解是用来开启Redis来集式式管理Session。 而在使用这种方式的时候,是需要Redis开启Keyspace Notifications功能的,默认是关闭的。 这个功能有一个参数来控制它,notify-keyspace-events,值为Egx。

  

原文地址:https://www.cnblogs.com/lixyu/p/11189534.html