ResolvableType-based matching respects generic factory method return type

Includes consistent use of ResolvableType.resolve() wherever applicable.

Issue: SPR-15011
This commit is contained in:
Juergen Hoeller
2016-12-17 23:10:48 +01:00
parent e9b4cac47f
commit 4c005e6336
14 changed files with 107 additions and 53 deletions

View File

@@ -1295,7 +1295,6 @@ public class AutowiredAnnotationBeanPostProcessorTests {
}
catch (UnsatisfiedDependencyException ex) {
// expected
ex.printStackTrace();
assertSame(CustomAnnotationRequiredFieldResourceInjectionBean.class,
ex.getInjectionPoint().getField().getDeclaringClass());
}
@@ -1681,9 +1680,6 @@ public class AutowiredAnnotationBeanPostProcessorTests {
assertSame(ir, bean.integerRepositoryMap.get("integerRepository"));
}
@Qualifier("integerRepo")
private Repository<?> integerRepositoryQualifierProvider;
@Test
public void testGenericsBasedFieldInjectionWithSimpleMatch() {
DefaultListableBeanFactory bf = new DefaultListableBeanFactory();
@@ -2194,6 +2190,10 @@ public class AutowiredAnnotationBeanPostProcessorTests {
}
@Qualifier("integerRepo")
private Repository<?> integerRepositoryQualifierProvider;
public static class ResourceInjectionBean {
@Autowired(required = false)