Update ShiroConfig.java

当使用redis的sentinel模式时,如果设置了redis的密码但未设置sentinel密码,会造成失败。NOAUTH Authentication required.
pull/6912/head
Sam Xu 2024-07-17 16:16:33 +08:00 committed by GitHub
parent 0148a0b45e
commit cd6bb2ca04
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -290,7 +290,7 @@ public class ShiroConfig {
RedisSentinelManager sentinelManager = new RedisSentinelManager(); RedisSentinelManager sentinelManager = new RedisSentinelManager();
sentinelManager.setMasterName(redisProperties.getSentinel().getMaster()); sentinelManager.setMasterName(redisProperties.getSentinel().getMaster());
sentinelManager.setHost(String.join(",", redisProperties.getSentinel().getNodes())); sentinelManager.setHost(String.join(",", redisProperties.getSentinel().getNodes()));
sentinelManager.setPassword(redisProperties.getSentinel().getPassword()); sentinelManager.setPassword(redisProperties.getPassword());
sentinelManager.setDatabase(redisProperties.getDatabase()); sentinelManager.setDatabase(redisProperties.getDatabase());
return sentinelManager; return sentinelManager;