protected static class DefaultResourceLoader.ClassPathContextResource extends ClassPathResource implements ContextResource
| 构造器和说明 |
|---|
ClassPathContextResource(String path,
ClassLoader classLoader) |
| 限定符和类型 | 方法和说明 |
|---|---|
Resource |
createRelative(String relativePath)
This implementation creates a ClassPathResource, applying the given path
relative to the path of the underlying resource of this descriptor.
|
String |
getPathWithinContext()
Return the path within the enclosing 'context'.
|
equals, exists, getClassLoader, getDescription, getFilename, getInputStream, getPath, getURL, hashCode, resolveURLcontentLength, customizeConnection, customizeConnection, getFile, getFile, getFileForLastModifiedCheck, isFile, isFile, isReadable, lastModified, readableChannelgetURI, isOpen, toStringcontentLength, exists, getDescription, getFile, getFilename, getURI, getURL, isFile, isOpen, isReadable, lastModified, readableChannelgetInputStreampublic ClassPathContextResource(String path, ClassLoader classLoader)
public String getPathWithinContext()
ContextResourceThis is typically path relative to a context-specific root directory, e.g. a ServletContext root or a PortletContext root.
getPathWithinContext 在接口中 ContextResourcepublic Resource createRelative(String relativePath)
ClassPathResourcecreateRelative 在接口中 ResourcecreateRelative 在类中 ClassPathResourcerelativePath - the relative path (relative to this resource)org.springframework.util.StringUtils#applyRelativePath(String, String)Copyright © 2020. All rights reserved.