We know in Spring that <bean> has a "primary" attribute, indicating that a bean is the first candidate if there are several beans available to auto-connect to the property.
But now all my bean definitions are declared using @ Component / @ Service, etc., I canโt find the corresponding โprimaryโ attribute that I can use to declare a bean.
Please advise how I can achieve this, thanks.
java spring annotations autowired
Matt
source share