See gh-22105
This commit is contained in:
Andy Wilkinson 2020-06-25 11:49:35 +01:00
parent 263adf1cde
commit ea30c096dd
1 changed files with 7 additions and 5 deletions

View File

@ -159,18 +159,20 @@ class BeanDefinitionLoader {
} }
} }
private int load(Resource source) { private void load(Resource source) {
if (source.getFilename().endsWith(".groovy")) { if (source.getFilename().endsWith(".groovy")) {
if (this.groovyReader == null) { if (this.groovyReader == null) {
throw new BeanDefinitionStoreException("Cannot load Groovy beans without Groovy on classpath"); throw new BeanDefinitionStoreException("Cannot load Groovy beans without Groovy on classpath");
} }
return this.groovyReader.loadBeanDefinitions(source); this.groovyReader.loadBeanDefinitions(source);
}
else {
this.xmlReader.loadBeanDefinitions(source);
} }
return this.xmlReader.loadBeanDefinitions(source);
} }
private int load(Package source) { private void load(Package source) {
return this.scanner.scan(source.getName()); this.scanner.scan(source.getName());
} }
private void load(CharSequence source) { private void load(CharSequence source) {