Skip to content

Commit 75e51f5

Browse files
committed
Deprecate LettuceConnectionFactory.setDatabase(…) in alignment with JedisConnectionFactory.setDatabase(…)
See #2831
1 parent 707184f commit 75e51f5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/java/org/springframework/data/redis/connection/lettuce/LettuceConnectionFactory.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -602,8 +602,12 @@ public int getDatabase() {
602602
/**
603603
* Sets the index of the database used by this connection factory. Default is 0.
604604
*
605-
* @param index database index
605+
* @param index database index.
606+
* @deprecated since 3.2, configure the database index using {@link RedisStandaloneConfiguration},
607+
* {@link RedisSocketConfiguration}, {@link RedisSentinelConfiguration}, or
608+
* {@link RedisStaticMasterReplicaConfiguration}.
606609
*/
610+
@Deprecated
607611
public void setDatabase(int index) {
608612

609613
Assert.isTrue(index >= 0, "invalid DB index (a positive index required)");

0 commit comments

Comments
 (0)