public class ClassPathScanningAnnotationProvider
extends org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider
findCandidateComponents(Class).
Can also limit research under a specific basePackage using findCandidateComponents(Class, String)| Constructor and Description |
|---|
ClassPathScanningAnnotationProvider() |
| Modifier and Type | Method and Description |
|---|---|
static java.util.Set<org.springframework.beans.factory.config.BeanDefinition> |
findCandidateComponents(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Simplest scan for class annotation in all packages.
|
static java.util.Set<org.springframework.beans.factory.config.BeanDefinition> |
findCandidateComponents(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType,
java.lang.String basePackage)
Scan for class annotation under basePackage.
|
static java.util.Set<org.springframework.beans.factory.config.BeanDefinition> |
findCandidateComponents(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType,
java.lang.String basePackage,
java.lang.ClassLoader classLoader)
Scan for class annotation under basePackage for that specific classloader (when many involved and result not found).
|
protected boolean |
isCandidateComponent(org.springframework.beans.factory.annotation.AnnotatedBeanDefinition beanDefinition) |
addExcludeFilter, addIncludeFilter, clearCache, findCandidateComponents, getEnvironment, getMetadataReaderFactory, getRegistry, getResourceLoader, isCandidateComponent, registerDefaultFilters, resetFilters, resolveBasePackage, setEnvironment, setMetadataReaderFactory, setResourceLoader, setResourcePatternprotected boolean isCandidateComponent(org.springframework.beans.factory.annotation.AnnotatedBeanDefinition beanDefinition)
isCandidateComponent in class org.springframework.context.annotation.ClassPathScanningCandidateComponentProviderpublic static java.util.Set<org.springframework.beans.factory.config.BeanDefinition> findCandidateComponents(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
annotationType - DesiredAnnotation.classBeanDefinition having class annotation DesiredAnnotationpublic static java.util.Set<org.springframework.beans.factory.config.BeanDefinition> findCandidateComponents(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType,
java.lang.String basePackage)
annotationType - DesiredAnnotation.classbasePackage - Only subpackage of basePackage is scanBeanDefinition having class annotation DesiredAnnotationpublic static java.util.Set<org.springframework.beans.factory.config.BeanDefinition> findCandidateComponents(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType,
java.lang.String basePackage,
java.lang.ClassLoader classLoader)
annotationType - DesiredAnnotation.classbasePackage - Only subpackage of basePackage is scanclassLoader - Pass a specific classloader to scanBeanDefinition having class annotation DesiredAnnotationCopyright © 2022. All Rights Reserved.