Package org.springframework.boot.io
Class ApplicationResourceLoader
java.lang.Object
org.springframework.core.io.DefaultResourceLoader
org.springframework.boot.io.ApplicationResourceLoader
- All Implemented Interfaces:
ResourceLoader
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
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.core.io.DefaultResourceLoader
DefaultResourceLoader.ClassPathContextResource
-
Field Summary
Fields inherited from interface org.springframework.core.io.ResourceLoader
CLASSPATH_URL_PREFIX
-
Constructor Summary
ConstructorDescriptionCreate a newApplicationResourceLoader
.ApplicationResourceLoader
(ClassLoader classLoader) Create a newApplicationResourceLoader
. -
Method Summary
Methods inherited from class org.springframework.core.io.DefaultResourceLoader
addProtocolResolver, clearResourceCaches, getClassLoader, getProtocolResolvers, getResource, getResourceCache, setClassLoader
-
Constructor Details
-
ApplicationResourceLoader
public ApplicationResourceLoader()Create a newApplicationResourceLoader
. -
ApplicationResourceLoader
Create a newApplicationResourceLoader
.- Parameters:
classLoader
- theClassLoader
to load class path resources with, ornull
for using the thread context class loader at the time of actual resource access
-
-
Method Details
-
getResourceByPath
- Overrides:
getResourceByPath
in classDefaultResourceLoader
-