eg. I have 2 beans of the same interface BillManager.
@Autowired
BillManager manager;
org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type...
solution:
import org.springframework.beans.factory.annotation.Qualifier;
@Autowired
@Qualifier(value = "billManagerImpl_1") //write bean ID or name
BillManager manager;
No comments:
Post a Comment