RESOLVED - issue SPR-6366: Cannot import bean definitions using classpath*: resource location

http://jira.springframework.org/browse/SPR-6366
This commit is contained in:
David Syer
2009-11-17 09:53:10 +00:00
parent 17887d24a1
commit 66939ded0f
4 changed files with 33 additions and 1 deletions

View File

@@ -27,6 +27,7 @@ import org.springframework.beans.factory.config.BeanDefinitionHolder;
import org.springframework.beans.factory.parsing.BeanComponentDefinition;
import org.springframework.beans.factory.support.BeanDefinitionReaderUtils;
import org.springframework.core.io.Resource;
import org.springframework.core.io.support.ResourcePatternUtils;
import org.springframework.util.ResourceUtils;
import org.springframework.util.StringUtils;
import org.springframework.util.SystemPropertyUtils;
@@ -172,9 +173,10 @@ public class DefaultBeanDefinitionDocumentReader implements BeanDefinitionDocume
boolean absoluteLocation = false;
try {
absoluteLocation = ResourceUtils.toURI(location).isAbsolute();
absoluteLocation = ResourcePatternUtils.isUrl(location) || ResourceUtils.toURI(location).isAbsolute();
} catch (Exception ex) {
// cannot convert to an URI, considering the location relative
// unless it is the well-known Spring prefix classpath*:
}
// check the