public class CustomRepositoryImplementationDetector extends Object
Repository instance. If
configured with a ImplementationDetectionConfiguration at construction time, the necessary component scan is
executed on first access, cached and its result is the filtered on every further implementation lookup according to
the given ImplementationDetectionConfiguration. If none is given initially, every invocation to
#detectCustomImplementation(String, String, ImplementationDetectionConfiguration) will issue a new component
scan.| Constructor and Description |
|---|
CustomRepositoryImplementationDetector(Environment environment,
ResourceLoader resourceLoader)
|
CustomRepositoryImplementationDetector(Environment environment,
ResourceLoader resourceLoader,
ImplementationDetectionConfiguration configuration)
Creates a new
CustomRepositoryImplementationDetector with the given Environment,
ResourceLoader and ImplementationDetectionConfiguration. |
| Modifier and Type | Method and Description |
|---|---|
Optional<AbstractBeanDefinition> |
detectCustomImplementation(ImplementationLookupConfiguration lookup)
Tries to detect a custom implementation for a repository bean by classpath scanning.
|
public CustomRepositoryImplementationDetector(Environment environment, ResourceLoader resourceLoader, ImplementationDetectionConfiguration configuration)
CustomRepositoryImplementationDetector with the given Environment,
ResourceLoader and ImplementationDetectionConfiguration. The latter will be registered for a
one-time component scan for implementation candidates that will the be used and filtered in all subsequent calls to
#detectCustomImplementation(RepositoryConfiguration).environment - must not be null.resourceLoader - must not be null.configuration - must not be null.public CustomRepositoryImplementationDetector(Environment environment, ResourceLoader resourceLoader)
CustomRepositoryImplementationDetector with the given Environment and
ResourceLoader. Calls to detectCustomImplementation(ImplementationLookupConfiguration) will issue
scans forenvironment - must not be null.resourceLoader - must not be null.public Optional<AbstractBeanDefinition> detectCustomImplementation(ImplementationLookupConfiguration lookup)
lookup - must not be null.AbstractBeanDefinition of the custom implementation or null if none found.Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.