Class ClassPathScanner
java.lang.Object
org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider
com.graphql_java_generator.client.graphqlrepository.ClassPathScanner
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.context.ResourceLoaderAware
,org.springframework.core.env.EnvironmentCapable
public class ClassPathScanner
extends org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider
scan all
GraphQLRepositoryFactory
annotated interfaces from specified packages. Spring provides
ClassPathScanningCandidateComponentProvider
for package scanning but it does not detect interfaces. Please
see this question and
its answer for more details. So I extended
ClassPathScanningCandidateComponentProvider
and overrode isCandidateComponent method.-
Field Summary
Fields inherited from class org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider
logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
isCandidateComponent
(org.springframework.beans.factory.annotation.AnnotatedBeanDefinition beanDefinition) Methods inherited from class org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider
addExcludeFilter, addIncludeFilter, clearCache, findCandidateComponents, getEnvironment, getMetadataReaderFactory, getRegistry, getResourceLoader, isCandidateComponent, registerDefaultFilters, resetFilters, resolveBasePackage, setEnvironment, setMetadataReaderFactory, setResourceLoader, setResourcePattern
-
Constructor Details
-
ClassPathScanner
public ClassPathScanner(boolean useDefaultFilters)
-
-
Method Details
-
isCandidateComponent
protected boolean isCandidateComponent(org.springframework.beans.factory.annotation.AnnotatedBeanDefinition beanDefinition) - Overrides:
isCandidateComponent
in classorg.springframework.context.annotation.ClassPathScanningCandidateComponentProvider
-