Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Having two bean factory methods with different return type results in NoSuchBeanDefinitionException [SPR-17437] #21970
When I create two bean factory methods with the same name and different return type (and with qualifiers of course), the Application Context fails to start and the error message suggests that there is no bean of either type defined. This is misleading error message. It should either work (all information to distinguish beans is there), or fail with proper error message (Eg. ambiguous factory method definition).
See attached example project.