You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Generic autowiring should support wiring of components with unresolved type variables [SPR-10993] #15621
If an ApplicationContext contains BeanDefinition instances for a type MyComponent<T> and you try to wire it to an injection point that explictly refers to a type parameter (e.g. MyComponent<String>) you currently get a NoSuchBeanDefinitionException.
Sorry for the crossed wires, but there's now a duplicate issue at #15632. It has a simple test-case attached, if you need it, otherwise go ahead and kill it.
DefaultListableBeanFactory performs a fallback check for autowire candidates now, which GenericTypeAwareAutowireCandidateResolver implements to accept raw type matches if the target class has unresolvable type variables. Full generic matches are still preferred; the BeanFactory will only start looking for fallback matches if the first pass led to an empty result.
Activity
spring-projects-issues commentedon Oct 18, 2013
nebhale commented
Sorry for the crossed wires, but there's now a duplicate issue at #15632. It has a simple test-case attached, if you need it, otherwise go ahead and kill it.
spring-projects-issues commentedon Oct 25, 2013
Juergen Hoeller commented
DefaultListableBeanFactory performs a fallback check for autowire candidates now, which GenericTypeAwareAutowireCandidateResolver implements to accept raw type matches if the target class has unresolvable type variables. Full generic matches are still preferred; the BeanFactory will only start looking for fallback matches if the first pass led to an empty result.