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-issuemaster opened this issue Oct 26, 2018 · 0 comments

Comments

@spring-issuemaster
Copy link
Collaborator

@spring-issuemaster spring-issuemaster 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:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.