Autowiring two different beans of same class

后端 未结 2 1906
感情败类
感情败类 2020-12-23 17:02

I have a class which wraps a connection pool, the class gets its connection details from a spring configuration as shown below:



        
2条回答
  •  生来不讨喜
    2020-12-23 17:35

    @Autowired
    @Qualifier("jedisConnector")
    JedisConnector beanA;
    
    @Autowired
    @Qualifier("jedisConnectorPOD")
    JedisConnector beanB;
    

提交回复
热议问题