-
Notifications
You must be signed in to change notification settings - Fork 41.6k
Closed
Labels
status: declinedA suggestion or change that we don't feel we should currently applyA suggestion or change that we don't feel we should currently apply
Description
It's common to connect multiple redis servers in the sample application, currently It's not easy to reuse RedisAutoConfiguration and LettuceConnectionConfiguration to create multiple redis related beans, I hope spring-boot could handle this just by adding a few properties, for example:
# primary redis
spring.redis:
host: localhost
port: 6379
# additional redis instances
spring.redis.additional-instances: foo,bar
foo.redis:
host: localhost
port: 6379
database: 1
bar.redis:
host: localhost
port: 6379
database: 2default redis related beans should be @Primary
// default redis
@Autowired RedisTemplate redisTemplate;
@Autowired RedisTemplate stringRedisTemplate;
// foo redis
@Autowired RedisTemplate fooRedisTemplate;
@Autowired RedisTemplate fooStringRedisTemplate;
// bar redis
@Autowired RedisTemplate barRedisTemplate;
@Autowired RedisTemplate barStringRedisTemplate;Metadata
Metadata
Assignees
Labels
status: declinedA suggestion or change that we don't feel we should currently applyA suggestion or change that we don't feel we should currently apply