类 DefaultResourceLoader.ClassPathContextResource
- java.lang.Object
-
- com.alibaba.nacos.common.packagescan.resource.AbstractResource
-
- com.alibaba.nacos.common.packagescan.resource.AbstractFileResolvingResource
-
- com.alibaba.nacos.common.packagescan.resource.ClassPathResource
-
- com.alibaba.nacos.common.packagescan.resource.DefaultResourceLoader.ClassPathContextResource
-
- 所有已实现的接口:
ContextResource,InputStreamSource,Resource
protected static class DefaultResourceLoader.ClassPathContextResource extends ClassPathResource implements ContextResource
ClassPathResource that explicitly expresses a context-relative path through implementing the ContextResource interface.
-
-
构造器概要
构造器 构造器 说明 ClassPathContextResource(java.lang.String path, java.lang.ClassLoader classLoader)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 ResourcecreateRelative(java.lang.String relativePath)This implementation creates a ClassPathResource, applying the given path relative to the path of the underlying resource of this descriptor.java.lang.StringgetPathWithinContext()Return the path within the enclosing 'context'.-
从类继承的方法 com.alibaba.nacos.common.packagescan.resource.ClassPathResource
equals, exists, getClassLoader, getDescription, getFilename, getInputStream, getPath, getUrl, hashCode, isReadable, resolveUrl
-
从类继承的方法 com.alibaba.nacos.common.packagescan.resource.AbstractFileResolvingResource
checkReadable, contentLength, customizeConnection, customizeConnection, getFile, getFile, getFileForLastModifiedCheck, isFile, isFile, lastModified, readableChannel
-
从类继承的方法 com.alibaba.nacos.common.packagescan.resource.AbstractResource
getUri, isOpen, toString
-
从接口继承的方法 com.alibaba.nacos.common.packagescan.resource.InputStreamSource
getInputStream
-
从接口继承的方法 com.alibaba.nacos.common.packagescan.resource.Resource
contentLength, exists, getDescription, getFile, getFilename, getUri, getUrl, isFile, isOpen, isReadable, lastModified, readableChannel
-
-
-
-
方法详细资料
-
getPathWithinContext
public java.lang.String getPathWithinContext()
从接口复制的说明:ContextResourceReturn 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.
- 指定者:
getPathWithinContext在接口中ContextResource
-
createRelative
public Resource createRelative(java.lang.String relativePath)
从类复制的说明:ClassPathResourceThis implementation creates a ClassPathResource, applying the given path relative to the path of the underlying resource of this descriptor.- 指定者:
createRelative在接口中Resource- 覆盖:
createRelative在类中ClassPathResource- 参数:
relativePath- the relative path (relative to this resource)- 返回:
- the resource handle for the relative resource
- 另请参阅:
StringUtils.applyRelativePath(String, String)
-
-