Since it is possible to recognize type for generic classes using ResolvableType mechanism, it should be possible to inject dependencies based on their defined types. It allows to autowire beans of generic types, created with BeanRegistryPostProcessor.

This test fails and shows, that Spring lacks capability of resolving any generics in runtime for beans, that have not defined their resolved type using Java or XML configuration. However, it is possible to check that all generics are resolved for this particular bean and it can be autowired.

I did some steps in direction of making this test green. This pull request aim is to ask if it is something, that is worth to fix in Spring. If it is, then I would want to ask in what direction should I move.

I started my work in direction of expanding MethodParameter with additional factory method, similar to MethodParameter.forExecutable. If we add ResolvableType as factory method parameter, it would completely possible to check resolved type for this MethodParameter.