java110
2023-05-09 c8b3b13e07a14bfb99aa87b839f15b4ab9046427
java110-core/src/main/java/com/java110/core/cache/Java110RedisConfig.java
@@ -59,8 +59,9 @@
        }
    }
    @Bean(name = "jedisCluster")
    @Autowired
//    @Bean(name = "jedisCluster")
//    @Autowired
    public JedisCluster jedisCluster(@Qualifier("jedis.pool.config") JedisPoolConfig config,
                                     @Value("${jedis.pool.host}") String host,
                                     @Value("${jedis.pool.port}") int port,
@@ -70,10 +71,6 @@
        if (timeout == 0) {
            timeout = 2000;
        }
        if (!host.contains(",")) {
            return null;
        }
        String[] hosts = host.split(",");
        Set<HostAndPort> nodes = new HashSet<>();
        String[] tmpHosts = null;
@@ -83,7 +80,6 @@
        }
        JedisCluster cluster = new JedisCluster(nodes);
        return cluster;
    }
    @Bean(name = "jedis.pool.config")