Browse Source

Update ShiroConfig.java

当使用redis的sentinel模式时,如果设置了redis的密码但未设置sentinel密码,会造成失败。NOAUTH Authentication required.
pull/6912/head
Sam Xu 4 months ago committed by GitHub
parent
commit
cd6bb2ca04
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java

2
jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java

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

Loading…
Cancel
Save