I have the bean config:
<bean id="PostLoginUpdater" class="xyz.auth.PostLoginUpdater" autowire="byType" />
and
public class PostLoginUpdater implements PostLoginStatePersonalizer {
//@Qualifier("CustomerManager")
@Inject
//@Resource(name = "CustomerManager")
private CustomerManager customerManager;
public void setCustomerManager(CustomerManager customerManager)
{
this.customerManager = customerManager;
}
}
Because there are two beans that implement CustomerManager I get this error:
No unique bean of type [CustomerManager] is defined: expected single matching bean but found 2
As you can see, I'v tried several combinations (@Inject along with @Qualifier, @Ressource, only @Qualifier) But I don't get rid of this error message.
According to Spring In Depth, @Qualifier can be used along with @Inject. Can't I used them together if I defined autowire="byType" in bean config?
And I don't use <context:annotation-config />
or <context:component-scan />