What is the alternative of using Qualifier annotation in XML in Spring?
问题 In Spring , if there are two bean ids which refer to the same class and we just want to inject values from only one bean, then we normally use the following annotations in conjunction : @Autowired @Qualifier("bean1") How to achieve the same thing using the xml specification ? What is the alternative of using qualifier annotation in xml ? 回答1: Not an exact alternative but you can use autowire-candidate="false" to all those beans which you want to exclude from being autowired apart from the one