public class PreferFileSystemResourceLoader
extends org.springframework.core.io.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.| Constructor and Description |
|---|
PreferFileSystemResourceLoader() |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.core.io.Resource |
getResource(String location) |
protected org.springframework.core.io.Resource |
getResourceByPath(String path) |
protected org.springframework.core.io.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 org.springframework.core.io.DefaultResourceLoaderpublic org.springframework.core.io.Resource getResource(String location)
Supports wildcard classpath locations prefixed with ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX.
getResource in interface org.springframework.core.io.ResourceLoadergetResource in class org.springframework.core.io.DefaultResourceLoaderCopyright © 1999–2019 Shibboleth Consortium. All rights reserved.