|
|
|
@ -98,10 +98,8 @@ class BeanDefinitionLoader {
|
|
|
|
|
void setBeanNameGenerator(BeanNameGenerator beanNameGenerator) {
|
|
|
|
|
this.annotatedReader.setBeanNameGenerator(beanNameGenerator);
|
|
|
|
|
this.scanner.setBeanNameGenerator(beanNameGenerator);
|
|
|
|
|
if (this.xmlReader != null) {
|
|
|
|
|
this.xmlReader.setBeanNameGenerator(beanNameGenerator);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set the resource loader to be used by the underlying readers and scanner.
|
|
|
|
@ -110,10 +108,8 @@ class BeanDefinitionLoader {
|
|
|
|
|
void setResourceLoader(ResourceLoader resourceLoader) {
|
|
|
|
|
this.resourceLoader = resourceLoader;
|
|
|
|
|
this.scanner.setResourceLoader(resourceLoader);
|
|
|
|
|
if (this.xmlReader != null) {
|
|
|
|
|
this.xmlReader.setResourceLoader(resourceLoader);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set the environment to be used by the underlying readers and scanner.
|
|
|
|
@ -122,10 +118,8 @@ class BeanDefinitionLoader {
|
|
|
|
|
void setEnvironment(ConfigurableEnvironment environment) {
|
|
|
|
|
this.annotatedReader.setEnvironment(environment);
|
|
|
|
|
this.scanner.setEnvironment(environment);
|
|
|
|
|
if (this.xmlReader != null) {
|
|
|
|
|
this.xmlReader.setEnvironment(environment);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Load the sources into the reader.
|
|
|
|
@ -176,9 +170,6 @@ class BeanDefinitionLoader {
|
|
|
|
|
this.groovyReader.loadBeanDefinitions(source);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
if (this.xmlReader == null) {
|
|
|
|
|
throw new BeanDefinitionStoreException("Cannot load XML bean definitions when XML support is disabled");
|
|
|
|
|
}
|
|
|
|
|
this.xmlReader.loadBeanDefinitions(source);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|