Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如果redis没设置密码登陆会报错 #13

Open
TitanBenny opened this issue Sep 29, 2017 · 1 comment
Open

如果redis没设置密码登陆会报错 #13

TitanBenny opened this issue Sep 29, 2017 · 1 comment

Comments

@TitanBenny
Copy link

TitanBenny commented Sep 29, 2017

代码有点问题,在application.properties里配置了redis的连接访问,却又在ShiroConfig.java创建redis连接工厂时又刷新了访问配置。开始还以为是配置问题,改了配置无效,原来是这个地方重置了连接配置。这个代码写的位置误导了我,另外既然配置文件里既然已经写了,又再这里刷新配置。若有同学遇到这个情况的时候注意了。

@TitanBenny
Copy link
Author

我看错了,原来不是因为配置问题,主要问题是这个地方建立连接工厂时时在应用初始化里,这里传了password,如果redis没设置密码的时候,这个地方传的时候也去掉密码,另外,既然配置写了,这里的配置直接饮用配置比较好,不然不好扩展维护。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant