evalsha is not supported in cluster environment

Object exeRet = stringRedisTemplate.execute((RedisCallback) connection -> {
            Object nativeConnection = connection.getNativeConnection();
            // 集群
            if (nativeConnection instanceof JedisCluster) {
                return ((JedisCluster) nativeConnection).eval(scriptSb.toString(), keys, args);
            }

            // 单机
            if (nativeConnection instanceof Jedis) {
                return ((Jedis) nativeConnection).eval(scriptSb.toString(), keys, args);
            }

            return null;
        });
 

                            
                        
                    
                    
                    

你可能感兴趣的:(evalsha is not supported in cluster environment)