gpt4 book ai didi

redis - Lettuce core redis blpop 带来Type mismatch Can't assign non-array value to an array

转载 作者:可可西里 更新时间:2023-11-01 11:24:32 26 4
gpt4 key购买 nike

我用的是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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com