【8.3.0】更新redis引用的变量修改

master
stylefeng 2024-10-14 11:20:34 +08:00
parent 1f27af5b9b
commit 6584441532
1 changed files with 4 additions and 4 deletions

View File

@ -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)));