Spring数据是否支持Redis模块?

问题描述 投票:0回答:1

我正在使用莴苣驱动程序(版本5.1.3RELEASE)使用Spring数据Redis(版本2.1.1RELEASE)我要使用此模块:https://oss.redislabs.com/redisjson/,但驱动程序似乎不支持它。

我尝试使用execute方法:

Object response = redisTemplate.execute((RedisCallback<String>) connection -> {
  return  (String) connection.execute("JSON.GET foo");
});

出现错误:

java.lang.IllegalArgumentException: No enum constant io.lettuce.core.protocol.CommandType.JSON.GET FOO

有没有办法做到这一点?如何使用Redis模块?

spring-boot redis spring-data spring-data-redis
1个回答
0
投票

我认为Lettuce不支持执行原始命令:How can i run Redis raw commands in Java Lettuce?

您能看到切换到Jedis是否有效?

© www.soinside.com 2019 - 2024. All rights reserved.