LoadTimeWeaverAware beans are consistently being created early for JPA weaving to work reliably

Reverted change for @Bean methods that declare FactoryBean as their return type: The effects of trying to create the FactoryBean to find out about its implementation type are too far-reaching. It's better to recommend declaring a specific return type in the method signature if you want the container to specifically react to your implementation type.

Issue: SPR-9857
This commit is contained in:
Juergen Hoeller
2012-10-12 22:56:08 +02:00
parent 2564db2bfd
commit 506e9f50d0
3 changed files with 3 additions and 7 deletions

View File

@@ -145,8 +145,8 @@ public class ConfigurationClassProcessingTests {
assertTrue(factory.isTypeMatch("factoryBean", List.class));
assertEquals(FactoryBean.class, factory.getType("&factoryBean"));
assertTrue(factory.isTypeMatch("&factoryBean", FactoryBean.class));
assertTrue(factory.isTypeMatch("&factoryBean", BeanClassLoaderAware.class));
assertTrue(factory.isTypeMatch("&factoryBean", ListFactoryBean.class));
assertFalse(factory.isTypeMatch("&factoryBean", BeanClassLoaderAware.class));
assertFalse(factory.isTypeMatch("&factoryBean", ListFactoryBean.class));
assertTrue(factory.getBean("factoryBean") instanceof List);
String[] beanNames = factory.getBeanNamesForType(FactoryBean.class);