Closed
Description
As of 5.0, if you have a null
bean, autowiring fails rather than injecting null
. The bean is present in the bean factory but the context won't resolve it for you anymore.
This is the failure analysis you get on startup with such a bean:
***************************
APPLICATION FAILED TO START
***************************
Description:
Parameter 0 of constructor in com.example.demo.MyStuff required a bean of type 'java.lang.String' that could not be found.
Action:
Consider defining a bean of type 'java.lang.String' in your configuration.
We should try to extract some more information (perhaps that the bean is null
now we know it's a special case?).