0
template.setEnableTransactionSupport(true);
template.multi();
template.opsForValue().set("mykey", "Hello World");
List<String> dataList = template.opsForList().range("mylist", 0, -1);
template.exec();
嗨,大家好。 我有一个名为清单“在我的Redis MYLIST”和它的尺寸为50无法在spring-data-redis事务中查询列表
但是当我运行这段代码,我无法得到我想要的东西。
字段‘DataList控件’为空,然而,“的myKey”与价值的“Hello World”在我的Redis仍然存在。
那么,如何才能让我的列表数据用于弹簧数据redis的交易?非常感谢。
谢谢你的分析,你的回答对我很有帮助。 –