查看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。

  

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM