Class ApplicationResourceLoader

java.lang.Object
org.springframework.core.io.DefaultResourceLoader
org.springframework.boot.io.ApplicationResourceLoader
All Implemented Interfaces:
ResourceLoader

public class ApplicationResourceLoader extends DefaultResourceLoader
Class can be used to obtain ResourceLoaders supporting additional ProtocolResolvers registered in spring.factories.

When not delegating to an existing resource loader, plain paths without a qualifier will resolve to file system resources. This is different from DefaultResourceLoader, which resolves unqualified paths to classpath resources.

Since:
3.3.0
Author:
Scott Frederick, Phillip Webb
  • Constructor Details

    • ApplicationResourceLoader

      @Deprecated(since="3.4.0", forRemoval=true) public ApplicationResourceLoader()
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 3.4.0 for removal in 3.6.0 in favor of get()
      Create a new ApplicationResourceLoader.
    • ApplicationResourceLoader

      @Deprecated(since="3.4.0", forRemoval=true) public ApplicationResourceLoader(ClassLoader classLoader)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 3.4.0 for removal in 3.6.0 in favor of get(ClassLoader)
      Create a new ApplicationResourceLoader.
      Parameters:
      classLoader - the ClassLoader to load class path resources with, or null for using the thread context class loader at the time of actual resource access
  • Method Details