类 EntityScanner
java.lang.Object
org.springframework.boot.autoconfigure.domain.EntityScanner
An entity scanner that searches the classpath from an
@EntityScan
specified packages.- 从以下版本开始:
- 1.4.0
- 作者:
- Phillip Webb
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明Create aClassPathScanningCandidateComponentProvider
to scan entities based on the specifiedApplicationContext
.scan
(Class<? extends Annotation>... annotationTypes) Scan for entities with the specified annotations.
-
构造器详细资料
-
EntityScanner
Create a newEntityScanner
instance.- 参数:
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
-
createClassPathScanningCandidateComponentProvider
protected ClassPathScanningCandidateComponentProvider createClassPathScanningCandidateComponentProvider(ApplicationContext context) Create aClassPathScanningCandidateComponentProvider
to scan entities based on the specifiedApplicationContext
.- 参数:
context
- theApplicationContext
to use- 返回:
- a
ClassPathScanningCandidateComponentProvider
suitable to scan entities - 从以下版本开始:
- 2.4.0
-