code: public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) {
          val name = SpringRestClientEnabledScan.class.getName();
          val annotationAttributes = importingClassMetadata.getAnnotationAttributes(name);
          val scanner = new ClassPathSpringRestClientScanner(registry);
  
          if (resourceLoader != null) { // this check is needed in Spring 3.1
              scanner.setResourceLoader(resourceLoader);
          }
  
          val annoAttrs = AnnotationAttributes.fromMap(annotationAttributes);
          Class<? extends BeanNameGenerator> generatorClass;
          generatorClass = annoAttrs.getClass("nameGenerator");
          if (!BeanNameGenerator.class.equals(generatorClass)) {
              scanner.setBeanNameGenerator(BeanUtils.instantiateClass(generatorClass));
          }
  
          val basePackages = new ArrayList<String>();
          for (val pkg : annoAttrs.getStringArray("value")) {
              if (StringUtils.hasText(pkg)) basePackages.add(pkg);
          }
  
          for (val pkg : annoAttrs.getStringArray("basePackages")) {
              if (StringUtils.hasText(pkg)) basePackages.add(pkg);
          }
  
          for (val clazz : annoAttrs.getClassArray("basePackageClasses")) {
              basePackages.add(ClassUtils.getPackageName(clazz));
          }
  
          if (basePackages.isEmpty()) {
              String className = importingClassMetadata.getClassName();
              basePackages.add(ClassUtils.getPackageName(className));
          }
  
          scanner.registerFilters();
          scanner.doScan(StringUtils.toStringArray(basePackages));
      }
docs: {@inheritDoc}