Example usage for org.springframework.data.repository.config CustomRepositoryImplementationDetector CustomRepositoryImplementationDetector

List of usage examples for org.springframework.data.repository.config CustomRepositoryImplementationDetector CustomRepositoryImplementationDetector

Introduction

In this page you can find the example usage for org.springframework.data.repository.config CustomRepositoryImplementationDetector CustomRepositoryImplementationDetector.

Prototype

public CustomRepositoryImplementationDetector(Environment environment, ResourceLoader resourceLoader,
        ImplementationDetectionConfiguration configuration) 

Source Link

Document

Creates a new CustomRepositoryImplementationDetector with the given Environment , ResourceLoader and ImplementationDetectionConfiguration .

Usage

From source file:org.agilemicroservices.autoconfigure.orm.RepositoryBeanDefinitionBuilder.java

/**
 * Creates a new {@link RepositoryBeanDefinitionBuilder} from the given {@link BeanDefinitionRegistry},
 * {@link RepositoryConfigurationExtension} and {@link ResourceLoader}.
 *
 * @param registry       must not be {@literal null}.
 * @param extension      must not be {@literal null}.
 * @param resourceLoader must not be {@literal null}.
 * @param environment    must not be {@literal null}.
 *///ww  w. ja  va  2  s  .co m
public RepositoryBeanDefinitionBuilder(BeanDefinitionRegistry registry,
        RepositoryConfigurationExtension extension, ResourceLoader resourceLoader, Environment environment) {

    Assert.notNull(extension, "RepositoryConfigurationExtension must not be null!");
    Assert.notNull(resourceLoader, "ResourceLoader must not be null!");
    Assert.notNull(environment, "Environment must not be null!");

    this.registry = registry;
    this.extension = extension;
    this.resourceLoader = resourceLoader;
    this.metadataReaderFactory = new CachingMetadataReaderFactory(resourceLoader);
    this.implementationDetector = new CustomRepositoryImplementationDetector(metadataReaderFactory, environment,
            resourceLoader);
}