Package org.grails.io.support
Class FileSystemResourceLoader
- java.lang.Object
-
- org.grails.io.support.DefaultResourceLoader
-
- org.grails.io.support.FileSystemResourceLoader
-
- All Implemented Interfaces:
ResourceLoader
public class FileSystemResourceLoader extends DefaultResourceLoader
ResourceLoaderimplementation that resolves plain paths as file system resources rather than as class path resources (the latter isDefaultResourceLoader's default strategy).NOTE: Plain paths will always be interpreted as relative to the current VM working directory, even if they start with a slash. (This is consistent with the semantics in a Servlet container.) Use an explicit "file:" prefix to enforce an absolute file path. is a full-fledged ApplicationContext implementation that provides the same resource path resolution strategy.
- Since:
- 1.1.3
- See Also:
DefaultResourceLoader
-
-
Field Summary
-
Fields inherited from interface org.grails.io.support.ResourceLoader
CLASSPATH_URL_PREFIX
-
-
Constructor Summary
Constructors Constructor Description FileSystemResourceLoader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ResourcegetResourceByPath(java.lang.String path)Resolve resource paths as file system paths.-
Methods inherited from class org.grails.io.support.DefaultResourceLoader
getClassLoader, getDefaultClassLoader, getResource, setClassLoader
-
-
-
-
Method Detail
-
getResourceByPath
protected Resource getResourceByPath(java.lang.String path)
Resolve resource paths as file system paths.Note: Even if a given path starts with a slash, it will get interpreted as relative to the current VM working directory.
- Overrides:
getResourceByPathin classDefaultResourceLoader- Parameters:
path- the path to the resource- Returns:
- the corresponding Resource handle
- See Also:
FileSystemResource
-
-