Class DefaultResourceLoader.ClassPathContextResource

    • Constructor Detail

      • ClassPathContextResource

        public ClassPathContextResource​(String path,
                                        ClassLoader classLoader)
    • Method Detail

      • getPathWithinContext

        public String getPathWithinContext()
        Description copied from interface: ContextResource
        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.

        Specified by:
        getPathWithinContext in interface ContextResource
      • createRelative

        public Resource createRelative​(String relativePath)
        Description copied from class: ClassPathResource
        This implementation creates a ClassPathResource, applying the given path relative to the path of the underlying resource of this descriptor.
        Specified by:
        createRelative in interface Resource
        Overrides:
        createRelative in class ClassPathResource
        Parameters:
        relativePath - the relative path (relative to this resource)
        Returns:
        the resource handle for the relative resource
        See Also:
        org.springframework.util.StringUtils#applyRelativePath(String, String)