Create a new AbstractBeanDefinitionReader for the given bean factory.
If the passed-in bean factory does not only implement the BeanDefinitionRegistry
interface but also the ResourceLoader interface, it will be used as default
ResourceLoader as well. This will usually be the case for
If the passed-in bean factory also implements EnvironmentCapable its
environment will be used by this reader. Otherwise, the reader will initialize and
use a StandardEnvironment. All ApplicationContext implementations are
EnvironmentCapable, while normal BeanFactory implementations are not.
registry - the BeanFactory to load bean definitions into,
in the form of a BeanDefinitionRegistry
Return the resource loader to use for resource locations.
Can be checked for the ResourcePatternResolver interface and cast
accordingly, for loading multiple resources for a given resource pattern.
A null return value suggests that absolute resource loading
is not available for this bean definition reader.
This is mainly meant to be used for importing further resources
from within a bean definition resource, for example via the "import"
tag in XML bean definitions. It is recommended, however, to apply
such imports relative to the defining resource; only explicit full
resource locations will trigger absolute resource loading.
There is also a loadBeanDefinitions(String) method available,
for loading bean definitions from a resource location (or location pattern).
This is a convenience to avoid explicit ResourceLoader handling.
Load bean definitions from the specified resource location.
The location can also be a location pattern, provided that the
ResourceLoader of this bean definition reader is a ResourcePatternResolver.
location - the resource location, to be loaded with the ResourceLoader
(or ResourcePatternResolver) of this bean definition reader
actualResources - a Set to be filled with the actual Resource objects
that have been resolved during the loading process. May be null
to indicate that the caller is not interested in those Resource objects.