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?
to your account
Kyle Anderson opened SPR-16628 and commented
When a bean annotated with @DependsOn references a bean name that doesn't exist, a NoSuchBeanDefinitionException is thrown.
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'myMissingBean' available
I think this exception can be improved to contain information pertaining to the bean that was annotated with @DependsOn.
org.springframework.beans.factory.NoSuchBeanDefinitionException: 'com.example.MyBean' depends on a bean named 'myMissingBean' but it wasn't available
This would add a little extra clarity and traceability.
Affects: 4.3.14, 5.0.4
Reference URL: #1751
Backported to: 4.3.15
The text was updated successfully, but these errors were encountered:
Juergen Hoeller commented
Good point! We're wrapping such a depends-on NoSuchBeanDefinitionException in a BeanCreationException for the dependent bean now, like we do for circular dependencies and also for injected dependencies already.
Sorry, something went wrong.
No branches or pull requests