redis 配置修改

This commit is contained in:
x ronger 2019-11-18 18:53:30 +08:00
parent e19e641db4
commit 67c332a40e

View File

@ -132,9 +132,11 @@ public class ShiroConfig implements EnvironmentAware {
public RedisManager redisManager() { public RedisManager redisManager() {
StringBuffer host = new StringBuffer(env.getProperty("spring.redis.host"));
host.append(":").append(env.getProperty("spring.redis.port"));
// 设置redis配置信息 // 设置redis配置信息
RedisManager redisManager = new RedisManager(); RedisManager redisManager = new RedisManager();
redisManager.setHost(env.getProperty("spring.redis.host")); redisManager.setHost(host.toString());
redisManager.setPassword(env.getProperty("spring.redis.password")); redisManager.setPassword(env.getProperty("spring.redis.password"));
return redisManager; return redisManager;
} }