public class PreferFileSystemResourceLoader extends DefaultResourceLoader
DefaultResourceLoader that is biased in favor of the filesystem such that bare resource paths
are assumed to be files rather than classpath resources.DefaultResourceLoader.ClassPathContextResourceCLASSPATH_URL_PREFIX| Constructor and Description |
|---|
PreferFileSystemResourceLoader() |
| Modifier and Type | Method and Description |
|---|---|
protected Resource |
getResourceByPath(String path) |
getClassLoader, getResource, 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 DefaultResourceLoaderCopyright © 1999–2015. All rights reserved.