Refresh | This website docs.spring.io/spring-framework/docs/5.1.1.RELEASE/javadoc-api/org/springframework/core/io/ProtocolResolver.html is currently offline. Cloudflare's Always Online™ shows a snapshot of this web page from the Internet Archive's Wayback Machine. To check for the live version, click Refresh. |
@FunctionalInterface
public interface ProtocolResolver
Used as an SPI for DefaultResourceLoader
, allowing for
custom protocols to be handled without subclassing the loader
implementation (or application context implementation).
DefaultResourceLoader.addProtocolResolver(org.springframework.core.io.ProtocolResolver)
Modifier and Type | Method and Description |
---|---|
Resource |
resolve(java.lang.String location,
ResourceLoader resourceLoader)
Resolve the given location against the given resource loader
if this implementation's protocol matches.
|
@Nullable Resource resolve(java.lang.String location, ResourceLoader resourceLoader)
location
- the user-specified resource locationresourceLoader
- the associated resource loaderResource
handle if the given location
matches this resolver's protocol, or null
otherwise