Skip to content

FailureAnalyzer doesn't provide useful information for the "null" bean case #13531

Closed
@snicoll

Description

@snicoll

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?).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions