接口 ContextResource
- 所有超级接口:
InputStreamSource,Resource
- 所有已知实现类:
DefaultResourceLoader.ClassPathContextResource,FileSystemResourceLoader.FileSystemContextResource
Extended interface for a resource that is loaded from an enclosing
'context', e.g. from a
jakarta.servlet.ServletContext but also
from plain classpath paths or relative file system paths (specified
without an explicit prefix, hence applying relative to the local
ResourceLoader's context).- 从以下版本开始:
- 4.0 2022/2/20 16:38
- 作者:
- Juergen Hoeller, Harry Yang
- 另请参阅:
-
cn.taketoday.web.servlet.support.ServletContextResource
-
字段概要
从接口继承的字段 cn.taketoday.core.io.Resource
EMPTY_ARRAY -
方法概要
从接口继承的方法 cn.taketoday.core.io.InputStreamSource
getInputStream, getReader, getReader, readableChannel从接口继承的方法 cn.taketoday.core.io.Resource
contentLength, createRelative, exists, getContentAsByteArray, getContentAsString, getFile, getName, getURI, getURL, isDirectory, isFile, isOpen, isReadable, lastModified, list, list, toString
-
方法详细资料
-
getPathWithinContext
String getPathWithinContext()Return the path within the enclosing 'context'.This is typically path relative to a context-specific root directory, e.g. a ServletContext root or a PortletContext root.
-