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