Consider the following class:
public class MyBean { private A a; @Autowired(required=true) public void setA(A a) { this.a = a; }
If you have multiple candidates for injection you can specify the default one by using @Primary on the bean you want to be the default AImpl. That way no changes are needed to MyBean