spring-geode/src/main/java/org/springframework/geode/context/annotation/RefreshableAnnotationConfigApplicationContext.java
/**
	 * Loads {@link BeanDefinition BeanDefinitions} from Annotation configuration (component) classes
	 * as well as from other resource locations (e.g. XML).
	 *
	 * @param beanFactory {@link DefaultListableBeanFactory} to configure.
	 * @throws BeansException if loading and configuring the {@link BeanDefinition BeanDefintions} for the target
	 * {@link DefaultListableBeanFactory} fails.
	 * @see org.springframework.beans.factory.support.DefaultListableBeanFactory
	 * @see #newAnnotatedBeanDefinitionReader(BeanDefinitionRegistry)
	 * @see #newClassBeanDefinitionScanner(BeanDefinitionRegistry)
	 * @see #getConfigLocations()
	 */
Loads  BeanDefinition BeanDefinitions from Annotation configuration (component) classes
as well as from other resource locations .

@param beanFactory  DefaultListableBeanFactory to configure.
@throws BeansException if loading and configuring the  BeanDefinition BeanDefintions for the target
DefaultListableBeanFactory fails.
Loads BeanDefinition BeanDefinitions from Annotation configuration ( component ) classes as well as from other resource locations . @param beanFactory DefaultListableBeanFactory to configure . @throws BeansException if loading and configuring the BeanDefinition BeanDefintions for the target DefaultListableBeanFactory fails .
@Override
	protected void loadBeanDefinitions(DefaultListableBeanFactory beanFactory) throws BeansException {
		AnnotatedBeanDefinitionReader reader = configure(newAnnotatedBeanDefinitionReader(beanFactory));
		ClassPathBeanDefinitionScanner scanner = configure(newClassBeanDefinitionScanner(beanFactory));
		getBeanNameGenerator().ifPresent(beanNameGenerator -> {
			reader.setBeanNameGenerator(beanNameGenerator);
			scanner.setBeanNameGenerator(beanNameGenerator);
			beanFactory.registerSingleton(AnnotationConfigUtils.CONFIGURATION_BEAN_NAME_GENERATOR, beanNameGenerator);
		});
		getScopeMetadataResolver().ifPresent(scopeMetadataResolver -> {
			reader.setScopeMetadataResolver(scopeMetadataResolver);
			scanner.setScopeMetadataResolver(scopeMetadataResolver);
		});
		Arrays.stream(ArrayUtils.nullSafeArray(getConfigLocations(), String.class)).forEach(configLocation -> {
			try {
				Class<?> type = ClassUtils.forName(configLocation, getClassLoader());
				getLogger().trace("Registering [{}]", configLocation);
				reader.register(type);
			}
			catch (ClassNotFoundException cause) {
				getLogger().trace(String.format("Could not load class for config location [%s] - trying package scan.",
					configLocation), cause);
				if (scanner.scan(configLocation) == 0) {
					getLogger().debug("No component classes found for specified class/package [{}]", configLocation);
				}
			}
		});
	}
@ Override protected void loadBeanDefinitions ( DefaultListableBeanFactory beanFactory ) throws BeansException { AnnotatedBeanDefinitionReader reader = configure ( newAnnotatedBeanDefinitionReader ( beanFactory ) ) ; ClassPathBeanDefinitionScanner scanner = configure ( newClassBeanDefinitionScanner ( beanFactory ) ) ; getBeanNameGenerator ( ) . ifPresent ( beanNameGenerator -> { reader . setBeanNameGenerator ( beanNameGenerator ) ; scanner . setBeanNameGenerator ( beanNameGenerator ) ; beanFactory . registerSingleton ( AnnotationConfigUtils . CONFIGURATION_BEAN_NAME_GENERATOR , beanNameGenerator ) ; } ) ; getScopeMetadataResolver ( ) . ifPresent ( scopeMetadataResolver -> { reader . setScopeMetadataResolver ( scopeMetadataResolver ) ; scanner . setScopeMetadataResolver ( scopeMetadataResolver ) ; } ) ; Arrays . stream ( ArrayUtils . nullSafeArray ( getConfigLocations ( ) , String . class ) ) . forEach ( configLocation -> { try { Class < ? > type = ClassUtils . forName ( configLocation , getClassLoader ( ) ) ; getLogger ( ) . trace ( "Registering [{}]" , configLocation ) ; reader . register ( type ) ; } catch ( ClassNotFoundException cause ) { getLogger ( ) . trace ( String . format ( "Could not load class for config location [%s] - trying package scan." , configLocation ) , cause ) ; if ( scanner . scan ( configLocation ) == 0 ) { getLogger ( ) . debug ( "No component classes found for specified class/package [{}]" , configLocation ) ; } } } ) ; }
Loads {@link BeanDefinition BeanDefinitions} from Annotation configuration (component) classes
 as well as from other resource locations (e.g.
Loads { @link BeanDefinition BeanDefinitions } from Annotation configuration ( component ) classes as well as from other resource locations ( e . g .