public class EntityScanner
extends java.lang.Object
@EntityScan
specified packages.| Constructor and Description |
|---|
EntityScanner(org.springframework.context.ApplicationContext context)
Create a new
EntityScanner instance. |
| Modifier and Type | Method and Description |
|---|---|
protected org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider |
createClassPathScanningCandidateComponentProvider(org.springframework.context.ApplicationContext context)
Create a
ClassPathScanningCandidateComponentProvider to scan entities based
on the specified ApplicationContext. |
java.util.Set<java.lang.Class<?>> |
scan(java.lang.Class<? extends java.lang.annotation.Annotation>... annotationTypes)
Scan for entities with the specified annotations.
|
public EntityScanner(org.springframework.context.ApplicationContext context)
EntityScanner instance.context - the source application context@SafeVarargs
public final java.util.Set<java.lang.Class<?>> scan(java.lang.Class<? extends java.lang.annotation.Annotation>... annotationTypes)
throws java.lang.ClassNotFoundException
annotationTypes - the annotation types used on the entitiesjava.lang.ClassNotFoundException - if an entity class cannot be loadedprotected org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider createClassPathScanningCandidateComponentProvider(org.springframework.context.ApplicationContext context)
ClassPathScanningCandidateComponentProvider to scan entities based
on the specified ApplicationContext.context - the ApplicationContext to useClassPathScanningCandidateComponentProvider suitable to scan
entities