Fixed RepositoryInterfaceAwareBeanPostProcessor.
Use correct bean type (FactoryBean instead of plain Factory) as well as the correct property (repositoryInterface).
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user