我用的是Letuce core,下面的代码((4)点)会报错 :“类型不匹配无法将非数组值分配给数组”
redisListCommands.lpush("service:queue","test1");
redisListCommands.lpush("service:queue","test2");
redisListCommands.lpush("service:queue","test3");
redisListCommands.brpop(123,"service:queue"); // (4)
最佳答案
尝试
redisListCommands.brpop(123, (Object[]) new String[]{"service:queue"});
但您的初始代码对我来说工作正常。
关于redis - Lettuce core redis blpop 带来Type mismatch Can't assign non-array value to an array,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50905414/