mirror of https://gitee.com/stylefeng/roses
【8.3.0】更新redis引用的变量修改
parent
1f27af5b9b
commit
6584441532
|
@ -76,10 +76,10 @@ public class ConfigInitListener extends ContextInitializedListener implements Or
|
|||
|
||||
if (redisConfigCacheEnableFlag) {
|
||||
// 获取Redis的相关配置
|
||||
String redisHost = environment.getProperty("spring.redis.host");
|
||||
String redisPort = environment.getProperty("spring.redis.port");
|
||||
String redisPassword = environment.getProperty("spring.redis.password");
|
||||
String dbNumber = environment.getProperty("spring.redis.database");
|
||||
String redisHost = environment.getProperty("spring.data.redis.host");
|
||||
String redisPort = environment.getProperty("spring.data.redis.port");
|
||||
String redisPassword = environment.getProperty("spring.data.redis.password");
|
||||
String dbNumber = environment.getProperty("spring.data.redis.database");
|
||||
|
||||
// 初始化Config Api
|
||||
ConfigContext.setConfigApi(new RedisConfigContainer(redisHost, Convert.toInt(redisPort, 6379), redisPassword, Convert.toInt(dbNumber, 0)));
|
||||
|
|
Loading…
Reference in New Issue