|
@@ -19,23 +19,23 @@ public class LongVideoRedisTemplateConfig {
|
|
|
|
|
|
@Bean("longVideoRedisPool")
|
|
|
@ConfigurationProperties(prefix = "spring.long-video-redis.lettuce.pool")
|
|
|
- public GenericObjectPoolConfig<LettucePoolingClientConfiguration> redisPool() {
|
|
|
+ public GenericObjectPoolConfig<LettucePoolingClientConfiguration> longVideoRedisPool() {
|
|
|
return new GenericObjectPoolConfig<>();
|
|
|
}
|
|
|
|
|
|
@Bean("longVideoRedisConfig")
|
|
|
@ConfigurationProperties(prefix = "spring.long-video-redis")
|
|
|
- public RedisStandaloneConfiguration tairConfig() {
|
|
|
+ public RedisStandaloneConfiguration longVideoRedisConfig() {
|
|
|
return new RedisStandaloneConfiguration();
|
|
|
}
|
|
|
|
|
|
@Bean("longVideoRedisFactory")
|
|
|
@Primary
|
|
|
- public LettuceConnectionFactory factory(GenericObjectPoolConfig<LettucePoolingClientConfiguration> redisPool,
|
|
|
- RedisStandaloneConfiguration redisConfig) {
|
|
|
+ public LettuceConnectionFactory factory(@Qualifier("longVideoRedisPool") GenericObjectPoolConfig<LettucePoolingClientConfiguration> longVideoRedisPool,
|
|
|
+ @Qualifier("longVideoRedisConfig") RedisStandaloneConfiguration longVideoRedisConfig) {
|
|
|
LettuceClientConfiguration lettuceClientConfiguration =
|
|
|
- LettucePoolingClientConfiguration.builder().poolConfig(redisPool).build();
|
|
|
- return new LettuceConnectionFactory(redisConfig, lettuceClientConfiguration);
|
|
|
+ LettucePoolingClientConfiguration.builder().poolConfig(longVideoRedisPool).build();
|
|
|
+ return new LettuceConnectionFactory(longVideoRedisConfig, lettuceClientConfiguration);
|
|
|
}
|
|
|
|
|
|
@Bean(name = "longVideoRedisTemplate")
|