Class FileSystemResourceLoader

java.lang.Object
org.springframework.core.io.DefaultResourceLoader
org.springframework.core.io.FileSystemResourceLoader
org.springframework.content.fs.io.FileSystemResourceLoader
All Implemented Interfaces:
org.springframework.core.io.ResourceLoader

public class FileSystemResourceLoader extends org.springframework.core.io.FileSystemResourceLoader
ResourceLoader implementation that resolves plain paths as DeletableResource file system resources rather than as class path resources (the latter is DefaultResourceLoader's default strategy).

NOTE: Plain paths will always be interpreted relative to the root specified during instantiation rather than relative to the current VM working directory (the latter is FileSystemResourceLoader's default behavior, even if they start with a slash.

  • Nested Class Summary

    Nested classes/interfaces inherited from class org.springframework.core.io.DefaultResourceLoader

    org.springframework.core.io.DefaultResourceLoader.ClassPathContextResource
  • Field Summary

    Fields inherited from interface org.springframework.core.io.ResourceLoader

    CLASSPATH_URL_PREFIX
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated.
    org.springframework.core.io.Resource
    getResource(String location)
     
    org.springframework.core.io.FileSystemResource
     

    Methods inherited from class org.springframework.core.io.FileSystemResourceLoader

    getResourceByPath

    Methods inherited from class org.springframework.core.io.DefaultResourceLoader

    addProtocolResolver, clearResourceCaches, getClassLoader, getProtocolResolvers, getResourceCache, setClassLoader

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FileSystemResourceLoader

      public FileSystemResourceLoader(String root)
  • Method Details

    • getFilesystemRoot

      @Deprecated public String getFilesystemRoot()
      Deprecated.
    • getRootResource

      public org.springframework.core.io.FileSystemResource getRootResource()
    • getResource

      public org.springframework.core.io.Resource getResource(String location)
      Specified by:
      getResource in interface org.springframework.core.io.ResourceLoader
      Overrides:
      getResource in class org.springframework.core.io.DefaultResourceLoader