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

    Constructors
    Constructor
    Description
    ClassPathScanner(boolean useDefaultFilters)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ClassPathScanner

      public ClassPathScanner(boolean useDefaultFilters)
  • Method Details

    • isCandidateComponent

      protected boolean isCandidateComponent(org.springframework.beans.factory.annotation.AnnotatedBeanDefinition beanDefinition)
      Overrides:
      isCandidateComponent in class org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider