{"header":{"type":"auto_translation","ret_code":"error","time_cost":1268.0,"request_id":"7135dc86592a11edb16dad0d39d360b4"},"message":"Translation error (20001), please retry later. Detail: RuntimeException - The length of source sentence is too long!!! - {\n "header": {\n "time_cost": 0.000441,\n "type": "auto_translation",\n "ret_code": "The length of source sentence is too long!!!"\n }\n}"}
4条答案
按热度按时间hujrc8aj1#
不要使用
JedisShardInfo
,因为它会导致配置的歧义。接受JedisShardInfo
的构造函数在Spring Data Redis 2.0中被弃用,请使用基于属性的配置:anauzrmj2#
我遇到了一个类似的问题,但是,它是与
JedisPool
,而不是与Spring
和JedisShardInfo
。我相信,虽然,这是本质上相同的问题。当连接到一个AWS Elasticache redis集群与SSL启用,我会得到一个解决我的问题的方法是使用
jedis 2.9.0
并启动我的JedisPool
,如下所示:这里使用
String
构造函数很重要,因为URI
构造函数不支持SSL。1sbrub3j3#
你只提到了AWS Elastic Redis,但你没有说明它是基于集群的Redis还是单节点Redis?
Spring Data Redis 2.2将支持带有SSL的集群。https://jira.spring.io/browse/DATAREDIS-974
bweufnob4#
对于redis client 3.2.0及以上版本,我们可以如下设置ssl属性:
使用JedisShardInfo:
使用JedisPool:
其中,在
poolConfig
中,您可以指定各种属性,例如,setMaxIdle
、setMaxWaitMillis
、setMaxTotal
等。