Commit 94deae49 authored by hanbing's avatar hanbing

[update] 动态获取utc Redis地址

parent 31a0401d
...@@ -112,9 +112,13 @@ public class RedisConfig extends CachingConfigurerSupport { ...@@ -112,9 +112,13 @@ public class RedisConfig extends CachingConfigurerSupport {
return new FastJson2JsonRedisSerializer(Object.class); return new FastJson2JsonRedisSerializer(Object.class);
} }
@Value("${spring.redis.host}")
private String redisHost;
@Value("${spring.redis.port}")
private Integer redisPort;
@Bean @Bean
public Jedis jedis() { public Jedis jedis() {
Jedis jedis = new Jedis("172.17.0.1", 6379); Jedis jedis = new Jedis(redisHost, redisPort);
jedis.auth("Wanji300552"); jedis.auth("Wanji300552");
return jedis; return jedis;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment