Class EntityScanner
- java.lang.Object
- org.springframework.boot.autoconfigure.domain.EntityScanner
public class EntityScanner extends Object
An entity scanner that searches the classpath from an@EntityScan
specified packages.- Since:
- 1.4.0
Constructor Summary
Constructors Constructor Description EntityScanner(org.springframework.context.ApplicationContext context)
Create a newEntityScanner
instance.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<Class<?>>
scan(Class<? extends Annotation>... annotationTypes)
Scan for entities with the specified annotations.
Constructor Detail
EntityScanner
public EntityScanner(org.springframework.context.ApplicationContext context)
Create a newEntityScanner
instance.- Parameters:
context
- the source application context
Method Detail
scan
@SafeVarargs public final Set<Class<?>> scan(Class<? extends Annotation>... annotationTypes) throws ClassNotFoundException
Scan for entities with the specified annotations.- Parameters:
annotationTypes
- the annotation types used on the entities- Returns:
- a set of entity classes
- Throws:
ClassNotFoundException
- if an entity class cannot be loaded