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
Stronger warning about overridden bean in case of type mismatch [SPR-16125] #20673
Comments
Juergen Hoeller commented This seems like an unfortunate case of bean definition overriding where the overriding bean is of a different type than the overridden one, replacing it by name (as per the rules) but not providing a bean reference of the same type, leading to a bean-by-type-not found exception in code which still expects the original bean to be present. In regular scenarios, an info-level log message "Overriding bean definition for bean..." should be issued. Could you please double-check whether that's present in your scenario? In any case, such overriding for a mix of standalone beans and |
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. |
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. |
Nguyen The Viet opened SPR-16125 and commented
I have following classes
with configurations
Expected: A warning or error about duplicated bean ids
Actual: Very ambiguous error - Parameter 0 of method b in com.company.Config2 required a bean of type 'com.company2.A' that could not be found.
Affects: 4.3.11
The text was updated successfully, but these errors were encountered: