Quantcast
Channel: Active questions tagged redis+java - Stack Overflow
Viewing all articles
Browse latest Browse all 2204

Where should I put @Qualifier when I have two @Beans?

$
0
0

So I have two beans for redis connection, and I am trying to specify certain times to use redisB. If I am correct, I need to put @Qualifier("redisB") somewhere, but I am not sure where to put it.

First bean

@Bean("default")@Primarypublic LettuceConnectionFactory redisConnectionFactory(){...}

Second bean

@Bean("redisB")public LettuceConnectionFactory redisConnectionFactory(final RedisProperties redisProperties){...}

Viewing all articles
Browse latest Browse all 2204

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>