-
Notifications
You must be signed in to change notification settings - Fork 41.6k
Closed
Labels
status: feedback-providedFeedback has been providedFeedback has been providedstatus: supersededAn issue that has been superseded by anotherAn issue that has been superseded by anothertype: enhancementA general enhancementA general enhancement
Description
If both Lettuce
and Jedis
exist on the classpath, LettuceConnectionConfiguration
and JedisConnectionConfiguration
will be created, but actually JedisConnectionConfiguration
is not necessary. It is recommended to add redis client type configuration, for example:
spring.redis.client.type=jedis
,
spring.redis.client.type=lettuce
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass({ GenericObjectPool.class, JedisConnection.class, Jedis.class })
@ConditionalOnProperty(name = "spring.redis.client.type", havingValue = "jedis", matchIfMissing = true)
class JedisConnectionConfiguration extends RedisConnectionConfiguration {
//...
}
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass(RedisClient.class)
@ConditionalOnProperty(name = "spring.redis.client.type", havingValue = "lettuce", matchIfMissing = true)
class LettuceConnectionConfiguration extends RedisConnectionConfiguration {
//...
}
Metadata
Metadata
Assignees
Labels
status: feedback-providedFeedback has been providedFeedback has been providedstatus: supersededAn issue that has been superseded by anotherAn issue that has been superseded by anothertype: enhancementA general enhancementA general enhancement