类 EntityScanner
- java.lang.Object
- org.springframework.boot.autoconfigure.domain.EntityScanner
public class EntityScanner extends Object
An entity scanner that searches the classpath from a@EntityScanspecified packages.- 从以下版本开始:
- 1.4.0
构造器概要
构造器 构造器 说明 EntityScanner(org.springframework.context.ApplicationContext context)Create a newEntityScannerinstance.
构造器详细资料
EntityScanner
public EntityScanner(org.springframework.context.ApplicationContext context)
Create a newEntityScannerinstance.- 参数:
context- the source application context
方法详细资料
scan
@SafeVarargs public final Set<Class<?>> scan(Class<? extends Annotation>... annotationTypes) throws ClassNotFoundException
Scan for entities with the specified annotations.- 参数:
annotationTypes- the annotation types used on the entities- 返回:
- a set of entity classes
- 抛出:
ClassNotFoundException- if an entity class cannot be loaded