This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Data Redis 3.4.0!spring-doc.cn

Migration Guides

This section contains details about migration steps, deprecations, and removals.spring-doc.cn

Upgrading from 2.x to 3.x

Re-/moved Types

Type Replacement

o.s.d.redis.Versionspring-doc.cn

o.s.d.util.Versionspring-doc.cn

o.s.d.redis.VersionParserspring-doc.cn

-spring-doc.cn

o.s.d.redis.connection.RedisZSetCommands.Aggregatespring-doc.cn

o.s.d.redis.connection.zset.Aggregatespring-doc.cn

o.s.d.redis.connection.RedisZSetCommands.Tuplespring-doc.cn

o.s.d.redis.connection.zset.Tuplespring-doc.cn

o.s.d.redis.connection.RedisZSetCommands.Weightsspring-doc.cn

o.s.d.redis.connection.zset.Weightsspring-doc.cn

o.s.d.redis.connection.RedisZSetCommands.Rangespring-doc.cn

o.s.d.domain.Rangespring-doc.cn

o.s.d.redis.connection.RedisZSetCommands.Limitspring-doc.cn

o.s.d.redis.connection.Limit.javaspring-doc.cn

o.s.d.redis.connection.jedis.JedisUtilsspring-doc.cn

-spring-doc.cn

o.s.d.redis.connection.jedis.JedisVersionUtilspring-doc.cn

-spring-doc.cn

o.s.d.redis.core.convert.CustomConversionsspring-doc.cn

o.s.d.convert.CustomConversionsspring-doc.cn

Changed Methods and Types

Table 1. Core
Type Method Replacement

o.s.d.redis.core.Cursorspring-doc.cn

openspring-doc.cn

-spring-doc.cn

o.s.d.redis.core.RedisTemplatespring-doc.cn

executespring-doc.cn

doWithKeysspring-doc.cn

o.s.d.redis.stream.StreamMessageListenerContainerspring-doc.cn

isAutoAckspring-doc.cn

isAutoAcknowledgespring-doc.cn

o.s.d.redis.stream.StreamMessageListenerContainerspring-doc.cn

autoAckspring-doc.cn

autoAcknowledgespring-doc.cn

Table 2. Redis Connection
Type Method Replacement

o.s.d.redis.connection.ClusterCommandExecutionFailureExceptionspring-doc.cn

getCausesspring-doc.cn

getSuppressedspring-doc.cn

o.s.d.redis.connection.RedisConnectionspring-doc.cn

bgWriteAofspring-doc.cn

bgReWriteAofspring-doc.cn

o.s.d.redis.connection.RedisConnectionspring-doc.cn

slaveOfspring-doc.cn

replicaOfspring-doc.cn

o.s.d.redis.connection.RedisConnectionspring-doc.cn

slaveOfNoOnespring-doc.cn

replicaOfNoOnespring-doc.cn

o.s.d.redis.connection.ReactiveClusterCommandsspring-doc.cn

clusterGetSlavesspring-doc.cn

clusterGetReplicasspring-doc.cn

o.s.d.redis.connection.ReactiveClusterCommandsspring-doc.cn

clusterGetMasterSlaveMapspring-doc.cn

clusterGetMasterReplicaMapspring-doc.cn

o.s.d.redis.connection.ReactiveKeyCommandsspring-doc.cn

getNewNamespring-doc.cn

getNewKeyspring-doc.cn

o.s.d.redis.connection.RedisClusterNode.Flagspring-doc.cn

SLAVEspring-doc.cn

REPLICAspring-doc.cn

o.s.d.redis.connection.RedisClusterNode.Builderspring-doc.cn

slaveOfspring-doc.cn

replicaOfspring-doc.cn

o.s.d.redis.connection.RedisNodespring-doc.cn

isSlavespring-doc.cn

isReplicaspring-doc.cn

o.s.d.redis.connection.RedisSentinelCommandsspring-doc.cn

slavesspring-doc.cn

replicasspring-doc.cn

o.s.d.redis.connection.RedisServerspring-doc.cn

getNumberSlavesspring-doc.cn

getNumberReplicasspring-doc.cn

o.s.d.redis.connection.RedisServerCommandsspring-doc.cn

slaveOfspring-doc.cn

replicaOfspring-doc.cn

o.s.d.redis.core.ClusterOperationsspring-doc.cn

getSlavesspring-doc.cn

getReplicasspring-doc.cn

o.s.d.redis.core.RedisOperationsspring-doc.cn

slaveOfspring-doc.cn

replicaOfspring-doc.cn

Table 3. Redis Operations
Type Method Replacement

o.s.d.redis.core.GeoOperations & BoundGeoOperationsspring-doc.cn

geoAddspring-doc.cn

addspring-doc.cn

o.s.d.redis.core.GeoOperations & BoundGeoOperationsspring-doc.cn

geoDistspring-doc.cn

distancespring-doc.cn

o.s.d.redis.core.GeoOperations & BoundGeoOperationsspring-doc.cn

geoHashspring-doc.cn

hashspring-doc.cn

o.s.d.redis.core.GeoOperations & BoundGeoOperationsspring-doc.cn

geoPosspring-doc.cn

positionspring-doc.cn

o.s.d.redis.core.GeoOperations & BoundGeoOperationsspring-doc.cn

geoRadiusspring-doc.cn

radiusspring-doc.cn

o.s.d.redis.core.GeoOperations & BoundGeoOperationsspring-doc.cn

geoRadiusByMemberspring-doc.cn

radiusspring-doc.cn

o.s.d.redis.core.GeoOperations & BoundGeoOperationsspring-doc.cn

geoRemovespring-doc.cn

removespring-doc.cn

Table 4. Redis Cache
Type Method Replacement

o.s.d.redis.cache.RedisCacheConfigurationspring-doc.cn

prefixKeysWithspring-doc.cn

prefixCacheNameWithspring-doc.cn

o.s.d.redis.cache.RedisCacheConfigurationspring-doc.cn

getKeyPrefixspring-doc.cn

getKeyPrefixForspring-doc.cn

Jedis

Please read the Jedis upgrading guide which covers important driver changes.spring-doc.cn

Table 5. Jedis Redis Connection
Type Method Replacement

o.s.d.redis.connection.jedis.JedisConnectionFactoryspring-doc.cn

getShardInfospring-doc.cn

can be obtained via JedisClientConfigurationspring-doc.cn

o.s.d.redis.connection.jedis.JedisConnectionFactoryspring-doc.cn

setShardInfospring-doc.cn

can be set via JedisClientConfigurationspring-doc.cn

o.s.d.redis.connection.jedis.JedisConnectionFactoryspring-doc.cn

createClusterspring-doc.cn

now requires a Connection instead of Jedis instancespring-doc.cn

o.s.d.redis.connection.jedis.JedisConvertersspring-doc.cn

has package visibility nowspring-doc.cn

o.s.d.redis.connection.jedis.JedisConvertersspring-doc.cn

tuplesToTuplesspring-doc.cn

-spring-doc.cn

o.s.d.redis.connection.jedis.JedisConvertersspring-doc.cn

tuplesToTuplesspring-doc.cn

-spring-doc.cn

o.s.d.redis.connection.jedis.JedisConvertersspring-doc.cn

stringListToByteListspring-doc.cn

-spring-doc.cn

o.s.d.redis.connection.jedis.JedisConvertersspring-doc.cn

stringSetToByteSetspring-doc.cn

-spring-doc.cn

o.s.d.redis.connection.jedis.JedisConvertersspring-doc.cn

stringMapToByteMapspring-doc.cn

-spring-doc.cn

o.s.d.redis.connection.jedis.JedisConvertersspring-doc.cn

tupleSetToTupleSetspring-doc.cn

-spring-doc.cn

o.s.d.redis.connection.jedis.JedisConvertersspring-doc.cn

toTupleSetspring-doc.cn

-spring-doc.cn

o.s.d.redis.connection.jedis.JedisConvertersspring-doc.cn

toDataAccessExceptionspring-doc.cn

o.s.d.redis.connection.jedis.JedisExceptionConverter#convertspring-doc.cn

Transactions / Pipelining

Pipelining and Transactions are now mutually exclusive. The usage of server or connection commands in pipeline/transactions mode is no longer possible.spring-doc.cn

Lettuce

Lettuce Pool

LettucePool and its implementation DefaultLettucePool have been removed without replacement. Please refer to the driver documentation for driver native pooling capabilities. Methods accepting pooling parameters have been updated. This effects methods on LettuceConnectionFactory and LettuceConnection.spring-doc.cn

Lettuce Authentication

AuthenticatingRedisClient has been removed without replacement. Please refer to the driver documentation for RedisURI to set authentication data.spring-doc.cn