code: public static void register(BeanDefinitionRegistry registry, String... packageNames) {
  		if (registry.containsBeanDefinition(BEAN)) {
  			BeanDefinition beanDefinition = registry.getBeanDefinition(BEAN);
  			ConstructorArgumentValues constructorArguments = beanDefinition
  					.getConstructorArgumentValues();
  			constructorArguments.addIndexedArgumentValue(0,
  					addBasePackages(constructorArguments, packageNames));
  		}
  		else {
  			GenericBeanDefinition beanDefinition = new GenericBeanDefinition();
  			beanDefinition.setBeanClass(BasePackages.class);
  			beanDefinition.getConstructorArgumentValues().addIndexedArgumentValue(0,
  					packageNames);
  			beanDefinition.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);
  			registry.registerBeanDefinition(BEAN, beanDefinition);
  		}
  	}
docs: Programmatically registers the auto-configuration package names. Subsequent
  invocations will add the given package names to those that have already been
  registered. You can use this method to manually define the base packages that will
  be used for a given {@link BeanDefinitionRegistry}. Generally it's recommended that
  you don't call this method directly, but instead rely on the default convention
  where the package name is set from your {@code @EnableAutoConfiguration}
  configuration class or classes.
  @param registry the bean definition registry
  @param packageNames the package names to set