Fixed RepositoryInterfaceAwareBeanPostProcessor.

Use correct bean type (FactoryBean instead of plain Factory) as well as the correct property (repositoryInterface).
This commit is contained in:
Oliver Gierke
2010-12-23 18:59:28 +01:00
parent e1ffab6131
commit df61026aaa
2 changed files with 4 additions and 4 deletions

View File

@@ -39,7 +39,7 @@ class RepositoryInterfaceAwareBeanPostProcessor extends
InstantiationAwareBeanPostProcessorAdapter implements BeanFactoryAware {
private static final Class<?> REPOSITORY_TYPE =
RepositoryFactorySupport.class;
RepositoryFactoryBeanSupport.class;
private ConfigurableListableBeanFactory context;
@@ -76,7 +76,7 @@ class RepositoryInterfaceAwareBeanPostProcessor extends
BeanDefinition definition = context.getBeanDefinition(beanName);
PropertyValue value =
definition.getPropertyValues().getPropertyValue("daoInterface");
definition.getPropertyValues().getPropertyValue("repositoryInterface");
return getClassForPropertyValue(value);
}

View File

@@ -40,9 +40,9 @@ import org.springframework.data.repository.Repository;
public class RepositoryInterfaceAwareBeanPostProcessorUnitTests {
private static final Class<?> FACTORY_CLASS =
RepositoryFactorySupport.class;
RepositoryFactoryBeanSupport.class;
private static final String BEAN_NAME = "foo";
private static final String DAO_INTERFACE_PROPERTY = "daoInterface";
private static final String DAO_INTERFACE_PROPERTY = "repositoryInterface";
private RepositoryInterfaceAwareBeanPostProcessor processor;