Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Having two bean factory methods with different return type results in NoSuchBeanDefinitionException [SPR-17437] #21970

Open
spring-projects-issues opened this issue Oct 26, 2018 · 0 comments
Labels
in: core status: waiting-for-triage

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Oct 26, 2018

Matúš Sekáč opened SPR-17437 and commented

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.


Affects: 5.0.10

Attachments:

@spring-projects-issues spring-projects-issues added type: bug status: waiting-for-triage in: core and removed type: bug labels Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core status: waiting-for-triage
Projects
None yet
Development

No branches or pull requests

1 participant