Class PreferFileSystemResourceLoader
java.lang.Object
org.springframework.core.io.DefaultResourceLoader
net.shibboleth.shared.spring.resource.PreferFileSystemResourceLoader
- All Implemented Interfaces:
ResourceLoader
An extension of
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.-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.core.io.DefaultResourceLoader
DefaultResourceLoader.ClassPathContextResource -
Field Summary
Fields inherited from interface org.springframework.core.io.ResourceLoader
CLASSPATH_URL_PREFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetResource(String location) protected ResourcegetResourceByPath(String path) Methods inherited from class org.springframework.core.io.DefaultResourceLoader
addProtocolResolver, clearResourceCaches, getClassLoader, getProtocolResolvers, getResourceCache, setClassLoader
-
Constructor Details
-
PreferFileSystemResourceLoader
public PreferFileSystemResourceLoader()
-
-
Method Details
-
getResourceByPath
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.
- Overrides:
getResourceByPathin classDefaultResourceLoader
-
getResource
Supports wildcard classpath locations prefixed with
ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX.- Specified by:
getResourcein interfaceResourceLoader- Overrides:
getResourcein classDefaultResourceLoader
-