Пример #1
0
  @Override
  public Resource createRelative(String relativePath) throws IOException {
    if (loader == null) {
      unsupportedOperation("no ResourceLoadingSupport");
      return null;
    }

    String pathToUse = StringUtils.applyRelativePath(location, relativePath);

    return loader.getResourceByPath(pathToUse);
  }
 @Override
 public Resource createRelative(String relativePath) throws IOException {
   String pathToUse = StringUtils.applyRelativePath(this.path, relativePath);
   return new NestedArchiveResource(rootArchive, pathToUse);
 }
 /**
  * This implementation creates a FileSystemResource, applying the given path relative to the path
  * of the underlying file of this resource descriptor.
  *
  * @see org.springframework.util.StringUtils#applyRelativePath(String, String)
  */
 public Resource createRelative(String relativePath) {
   String pathToUse = StringUtils.applyRelativePath(this.path, relativePath);
   return new FileSystemResource(pathToUse);
 }
Пример #4
0
 public Resource createRelative(String relativePath) {
   String pathToUse = StringUtils.applyRelativePath(storage.getEntryName(), relativePath);
   return new EclipsePathMatchingResourcePatternResolver(project).getResource(pathToUse);
 }
 /**
  * This implementation creates a ClassPathResource, applying the given path relative to the path
  * of the underlying resource of this descriptor.
  *
  * @see org.springframework.util.StringUtils#applyRelativePath(String, String)
  */
 @Override
 public Resource createRelative(String relativePath) {
   String pathToUse = StringUtils.applyRelativePath(this.path, relativePath);
   return new ClassPathResource(pathToUse, this.classLoader, this.clazz);
 }