接口的使用
com.alibaba.nacos.common.packagescan.resource.Resource
使用Resource的程序包
-
com.alibaba.nacos.common.packagescan.resource中Resource的使用
修饰符和类型接口说明interfaceCopy from https://github.com/spring-projects/spring-framework.git, with less modifications Extended interface for a resource that is loaded from an enclosing 'context', e.g. from ajakarta.servlet.ServletContextbut also from plain classpath paths or relative file system paths (specified without an explicit prefix, hence applying relative to the localResourceLoader's context).interfaceCopy from https://github.com/spring-projects/spring-framework.git, with less modifications Extended interface for a resource that supports writing to it.修饰符和类型类说明classCopy from https://github.com/spring-projects/spring-framework.git, with less modifications Abstract base class for resources which resolve URLs into File references, such asUrlResourceorClassPathResource.classCopy from https://github.com/spring-projects/spring-framework.git, with less modifications Convenience base class forResourceimplementations, pre-implementing typical behavior.classCopy from https://github.com/spring-projects/spring-framework.git, with less modificationsResourceimplementation for a given byte array.classCopy from https://github.com/spring-projects/spring-framework.git, with less modificationsResourceimplementation for class path resources.protected static classClassPathResource that explicitly expresses a context-relative path through implementing the ContextResource interface.classCopy from https://github.com/spring-projects/spring-framework.git, with less modificationsResourceimplementation forjava.io.Fileandjava.nio.file.Pathhandles with a file system target.classCopy from https://github.com/spring-projects/spring-framework.git, with less modifications Subclass ofUrlResourcewhich assumes file resolution, to the degree of implementing theWritableResourceinterface for it.classCopy from https://github.com/spring-projects/spring-framework.git, with less modificationsResourceimplementation for a givenInputStream.classclassCopy from https://github.com/spring-projects/spring-framework.git, with less modificationsResourceimplementation forjava.net.URLlocators.classCopy from https://github.com/spring-projects/spring-framework.git, with less modifications JBoss VFS basedResourceimplementation.修饰符和类型方法说明protected ResourcePathMatchingResourcePatternResolver.convertClassLoaderUrl(URL url) Convert the given URL as returned from the ClassLoader into aResource.AbstractResource.createRelative(String relativePath) This implementation throws a FileNotFoundException, assuming that relative resources cannot be created for this resource.ClassPathResource.createRelative(String relativePath) This implementation creates a ClassPathResource, applying the given path relative to the path of the underlying resource of this descriptor.DefaultResourceLoader.ClassPathContextResource.createRelative(String relativePath) FileSystemResource.createRelative(String relativePath) This implementation creates a FileSystemResource, applying the given path relative to the path of the underlying file of this resource descriptor.FileUrlResource.createRelative(String relativePath) PathResource.createRelative(String relativePath) This implementation creates a PathResource, applying the given path relative to the path of the underlying file of this resource descriptor.Resource.createRelative(String relativePath) Create a resource relative to this resource.UrlResource.createRelative(String relativePath) This implementation creates aUrlResource, delegating toUrlResource.createRelativeUrl(String)for adapting the relative path.VfsResource.createRelative(String relativePath) protected Resource[]PathMatchingResourcePatternResolver.findAllClassPathResources(String location) Find all class location resources with the given location via the ClassLoader.protected Resource[]PathMatchingResourcePatternResolver.findPathMatchingResources(String locationPattern) Find all resources that match the given location pattern via the Ant-style PathMatcher.DefaultResourceLoader.getResource(String location) PathMatchingResourcePatternResolver.getResource(String location) ResourceLoader.getResource(String location) Return aResourcehandle for the specified resource location.protected ResourceDefaultResourceLoader.getResourceByPath(String path) Return a Resource handle for the resource at the given path.Resource[]PathMatchingResourcePatternResolver.getResources(String locationPattern) Resource[]ResourcePatternResolver.getResources(String locationPattern) Resolve the given location pattern intoResourceobjects.ProtocolResolver.resolve(String location, ResourceLoader resourceLoader) Resolve the given location against the given resource loader if this implementation's protocol matches.protected ResourcePathMatchingResourcePatternResolver.resolveRootDirResource(Resource original) Resolve the specified resource for path matching.返回变量类型为Resource的类型的com.alibaba.nacos.common.packagescan.resource中的方法修饰符和类型方法说明PathMatchingResourcePatternResolver.doFindAllClassPathResources(String path) Find all class location resources with the given path via the ClassLoader.PathMatchingResourcePatternResolver.doFindMatchingFileSystemResources(File rootDir, String subPattern) Find all resources in the file system that match the given location pattern via the Ant-style PathMatcher.PathMatchingResourcePatternResolver.doFindPathMatchingFileResources(Resource rootDirResource, String subPattern) Find all resources in the file system that match the given location pattern via the Ant-style PathMatcher.PathMatchingResourcePatternResolver.doFindPathMatchingJarResources(Resource rootDirResource, URL rootDirUrl, String subPattern) Find all resources in jar files that match the given location pattern via the Ant-style PathMatcher.DefaultResourceLoader.getResourceCache(Class<T> valueType) Obtain a cache for the given value type, keyed byResource.修饰符和类型方法说明PathMatchingResourcePatternResolver.doFindPathMatchingFileResources(Resource rootDirResource, String subPattern) Find all resources in the file system that match the given location pattern via the Ant-style PathMatcher.PathMatchingResourcePatternResolver.doFindPathMatchingJarResources(Resource rootDirResource, URL rootDirUrl, String subPattern) Find all resources in jar files that match the given location pattern via the Ant-style PathMatcher.protected booleanPathMatchingResourcePatternResolver.isJarResource(Resource resource) Return whether the given resource handle indicates a jar resource that thedoFindPathMatchingJarResourcesmethod can handle.protected ResourcePathMatchingResourcePatternResolver.resolveRootDirResource(Resource original) Resolve the specified resource for path matching.类型变量类型为Resource的com.alibaba.nacos.common.packagescan.resource中的方法参数修饰符和类型方法说明protected voidPathMatchingResourcePatternResolver.addAllClassLoaderJarRoots(ClassLoader classLoader, Set<Resource> result) Search allURLClassLoaderURLs for jar file references and add them to the given set of resources in the form of pointers to the root of the jar file content.protected voidPathMatchingResourcePatternResolver.addClassPathManifestEntries(Set<Resource> result) Determine jar file references from the "java.class.path." manifest property and add them to the given set of resources in the form of pointers to the root of the jar file content.