We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a953335 commit b93c808Copy full SHA for b93c808
src/main/java/com/example/postgresdemo/Service/RedisConfig.java
@@ -12,7 +12,11 @@ public class RedisConfig {
12
public JedisPool jedisPool() {
13
JedisPoolConfig config = new JedisPoolConfig();
14
config.setMaxTotal(8);
15
- config.setJmxEnabled(false); // <-- Это отключает регистрацию MBean
16
- return new JedisPool(config, "localhost", 6379);
+ config.setJmxEnabled(false);
+
17
+ String redisHost = System.getenv("REDIS_HOST");
18
+ int redisPort = Integer.parseInt(System.getenv("REDIS_PORT"));
19
20
+ return new JedisPool(config, redisHost, redisPort);
21
}
22
0 commit comments