类 FileSystemResourceLoader
- java.lang.Object
- org.springframework.core.io.DefaultResourceLoader
- org.springframework.core.io.FileSystemResourceLoader
- 所有已实现的接口:
ResourceLoader
public class FileSystemResourceLoader extends DefaultResourceLoader
ResourceLoader
implementation 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.
FileSystemXmlApplicationContext
is a full-fledged ApplicationContext implementation that provides the same resource path resolution strategy.- 从以下版本开始:
- 1.1.3
- 作者:
- Juergen Hoeller
- 另请参阅:
DefaultResourceLoader
,FileSystemXmlApplicationContext
嵌套类概要
从类继承的嵌套类/接口 org.springframework.core.io.DefaultResourceLoader
DefaultResourceLoader.ClassPathContextResource
字段概要
从接口继承的字段 org.springframework.core.io.ResourceLoader
CLASSPATH_URL_PREFIX
构造器概要
构造器 构造器 说明 FileSystemResourceLoader()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected Resource
getResourceByPath(String path)
Resolve resource paths as file system paths.从类继承的方法 org.springframework.core.io.DefaultResourceLoader
addProtocolResolver, getClassLoader, getProtocolResolvers, getResource, setClassLoader
构造器详细资料
FileSystemResourceLoader
public FileSystemResourceLoader()
方法详细资料
getResourceByPath
protected Resource getResourceByPath(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.
- 覆盖:
getResourceByPath
在类中DefaultResourceLoader
- 参数:
path
- the path to the resource- 返回:
- the corresponding Resource handle
- 另请参阅:
FileSystemResource
,ServletContextResourceLoader.getResourceByPath(java.lang.String)