|
|
|
@ -39,6 +39,7 @@ import org.springframework.data.repository.core.support.AbstractRepositoryMetada |
|
|
|
import org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport; |
|
|
|
import org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport; |
|
|
|
import org.springframework.data.repository.core.support.RepositoryFragment; |
|
|
|
import org.springframework.data.repository.core.support.RepositoryFragment; |
|
|
|
import org.springframework.data.repository.core.support.RepositoryFragmentsContributor; |
|
|
|
import org.springframework.data.repository.core.support.RepositoryFragmentsContributor; |
|
|
|
|
|
|
|
import org.springframework.util.Assert; |
|
|
|
import org.springframework.util.ClassUtils; |
|
|
|
import org.springframework.util.ClassUtils; |
|
|
|
import org.springframework.util.ObjectUtils; |
|
|
|
import org.springframework.util.ObjectUtils; |
|
|
|
|
|
|
|
|
|
|
|
@ -82,6 +83,8 @@ class RepositoryBeanDefinitionReader { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public RepositoryInformation getRepositoryInformation() { |
|
|
|
public RepositoryInformation getRepositoryInformation() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Assert.notNull(configuration, "Configuration must not be null"); |
|
|
|
|
|
|
|
|
|
|
|
RepositoryMetadata metadata = AbstractRepositoryMetadata |
|
|
|
RepositoryMetadata metadata = AbstractRepositoryMetadata |
|
|
|
.getMetadata(forName(configuration.getRepositoryInterface())); |
|
|
|
.getMetadata(forName(configuration.getRepositoryInterface())); |
|
|
|
Class<?> repositoryBaseClass = getRepositoryBaseClass(); |
|
|
|
Class<?> repositoryBaseClass = getRepositoryBaseClass(); |
|
|
|
@ -178,6 +181,8 @@ class RepositoryBeanDefinitionReader { |
|
|
|
return (RepositoryFragmentsContributor) BeanUtils.instantiateClass(getClass(bd)); |
|
|
|
return (RepositoryFragmentsContributor) BeanUtils.instantiateClass(getClass(bd)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Assert.state(beanDefinition.getBeanClassName() != null, "No Repository BeanFactory set"); |
|
|
|
|
|
|
|
|
|
|
|
Class<?> repositoryFactoryBean = forName(beanDefinition.getBeanClassName()); |
|
|
|
Class<?> repositoryFactoryBean = forName(beanDefinition.getBeanClassName()); |
|
|
|
Constructor<?> constructor = ClassUtils.getConstructorIfAvailable(repositoryFactoryBean, Class.class); |
|
|
|
Constructor<?> constructor = ClassUtils.getConstructorIfAvailable(repositoryFactoryBean, Class.class); |
|
|
|
|
|
|
|
|
|
|
|
|