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

Improve error message when using reserved bean name #31725

Closed
axel7083 opened this issue Nov 30, 2023 · 3 comments
Closed

Improve error message when using reserved bean name #31725

axel7083 opened this issue Nov 30, 2023 · 3 comments

Comments

@axel7083
Copy link

Affects: v6


I created a TransactionManager forgetting that there was already a default bean with this name. From the error message it was very hard to figure out the name overlap issue.

Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.example.TransactionManager' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Nov 30, 2023
@snicoll
Copy link
Member

snicoll commented Dec 1, 2023

@axel7083 bean overriding is something we'd like to deprecate (#31288) so it should throw an exception upfront, which is what happens already by default with Spring Boot for a long time.

We can't really proceed until we understand how you ended up in this situation. Please create a small sample that we can run ourselves. You can attach a zip to this issue or push the code to a separate GitHub repository.

@snicoll snicoll added the status: waiting-for-feedback We need additional information before we can continue label Dec 1, 2023
@spring-projects-issues
Copy link
Collaborator

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

@spring-projects-issues spring-projects-issues added the status: feedback-reminder We've sent a reminder that we need additional information before we can continue label Dec 8, 2023
@spring-projects-issues
Copy link
Collaborator

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.

@spring-projects-issues spring-projects-issues closed this as not planned Won't fix, can't repro, duplicate, stale Dec 15, 2023
@spring-projects-issues spring-projects-issues removed status: waiting-for-feedback We need additional information before we can continue status: feedback-reminder We've sent a reminder that we need additional information before we can continue status: waiting-for-triage An issue we've not yet triaged or decided on labels Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants