public class FileSystemResourceLoader extends DefaultResourceLoader
ResourceLoader
implementation that resolves plain paths as
file system resources rather than as class path resources
(the latter is DefaultResourceLoader
'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.
org.springframework.context.support.FileSystemXmlApplicationContext
is a full-fledged ApplicationContext implementation that provides
the same resource path resolution strategy.
DefaultResourceLoader
,
org.springframework.context.support.FileSystemXmlApplicationContext
CLASSPATH_URL_PREFIX
构造器和说明 |
---|
FileSystemResourceLoader() |
限定符和类型 | 方法和说明 |
---|---|
static Resource |
getFsResource(String path) |
protected Resource |
getResourceByPath(String path)
Resolve resource paths as file system paths.
|
getClassLoader, getResource, setClassLoader
protected Resource getResourceByPath(String path)
Note: Even if a given path starts with a slash, it will get interpreted as relative to the current VM working directory.
getResourceByPath
在类中 DefaultResourceLoader
path
- the path to the resourceFileSystemResource
,
org.springframework.web.context.support.ServletContextResourceLoader#getResourceByPath
Copyright © 2018 jretty-org. All rights reserved.