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, isReadable, resolveUrlcontentLength, customizeConnection, customizeConnection, getFile, getFile, getFileForLastModifiedCheck, isFile, isFile, 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)StringUtils.applyRelativePath(String, String)Copyright © 2018–2024 Alibaba Group. All rights reserved.