public class PreferFileSystemResourceLoader extends DefaultResourceLoader
DefaultResourceLoader that (1) is biased in favor of the filesystem such that bare resource
paths are assumed to be files rather than classpath resources and (2) supports loading "classpath*:" resources.DefaultResourceLoader.ClassPathContextResourceCLASSPATH_URL_PREFIX| Constructor and Description |
|---|
PreferFileSystemResourceLoader() |
| Modifier and Type | Method and Description |
|---|---|
Resource |
getResource(String location) |
protected Resource |
getResourceByPath(String path) |
addProtocolResolver, getClassLoader, getProtocolResolvers, setClassLoaderprotected Resource getResourceByPath(String path)
Overrides the standard behavior of path-only resources and treats them as file paths if the path exists. Note that this differs from the ordinary Spring contexts that default to file paths because paths are treated as absolute if they are in fact absolute.
getResourceByPath in class DefaultResourceLoaderpublic Resource getResource(String location)
Supports wildcard classpath locations prefixed with ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX.
getResource in interface ResourceLoadergetResource in class DefaultResourceLoaderCopyright © 1999–2016 Shibboleth Consortium. All rights reserved.