Class ApplicationResourceLoader

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

public class ApplicationResourceLoader extends DefaultResourceLoader
A DefaultResourceLoader with any ProtocolResolvers registered in a spring.factories file applied to it. 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
  • Constructor Details

    • ApplicationResourceLoader

      public ApplicationResourceLoader()
      Create a new ApplicationResourceLoader.
    • ApplicationResourceLoader

      public ApplicationResourceLoader(ClassLoader 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