From 67c332a40eb87fc02cdb3292fdf2fc13dbd4e22b Mon Sep 17 00:00:00 2001 From: x ronger Date: Mon, 18 Nov 2019 18:53:30 +0800 Subject: [PATCH] =?UTF-8?q?redis=20=E9=85=8D=E7=BD=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/rymcu/vertical/config/ShiroConfig.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/rymcu/vertical/config/ShiroConfig.java b/src/main/java/com/rymcu/vertical/config/ShiroConfig.java index c5bbb76..687820f 100644 --- a/src/main/java/com/rymcu/vertical/config/ShiroConfig.java +++ b/src/main/java/com/rymcu/vertical/config/ShiroConfig.java @@ -132,9 +132,11 @@ public class ShiroConfig implements EnvironmentAware { public RedisManager redisManager() { + StringBuffer host = new StringBuffer(env.getProperty("spring.redis.host")); + host.append(":").append(env.getProperty("spring.redis.port")); // 设置redis配置信息 RedisManager redisManager = new RedisManager(); - redisManager.setHost(env.getProperty("spring.redis.host")); + redisManager.setHost(host.toString()); redisManager.setPassword(env.getProperty("spring.redis.password")); return redisManager; }