Class MavenResourceLoader
java.lang.Object
org.springframework.cloud.function.deployer.utils.MavenResourceLoader
- All Implemented Interfaces:
org.springframework.core.io.ResourceLoader
public class MavenResourceLoader
extends Object
implements org.springframework.core.io.ResourceLoader
A
ResourceLoader that loads MavenResources from locations of the format
maven://<coordinates> where the value for "coordinates" conforms to the rules
described on MavenResource.parse(String) .- Author:
- Mark Fisher
-
Field Summary
Fields inherited from interface org.springframework.core.io.ResourceLoader
CLASSPATH_URL_PREFIX -
Constructor Summary
ConstructorsConstructorDescriptionMavenResourceLoader(MavenProperties properties) Create aMavenResourceLoaderthat uses the providedMavenProperties. -
Method Summary
Modifier and TypeMethodDescriptionReturns theClassLoaderfor this ResourceLoader.org.springframework.core.io.ResourcegetResource(String location) Returns aMavenResourcefor the provided location.
-
Constructor Details
-
MavenResourceLoader
Create aMavenResourceLoaderthat uses the providedMavenProperties.- Parameters:
properties- theMavenPropertiesto use when instantiatingMavenResources
-
-
Method Details
-
getResource
Returns aMavenResourcefor the provided location.- Specified by:
getResourcein interfaceorg.springframework.core.io.ResourceLoader- Parameters:
location- the coordinates conforming to the rules described onMavenResource.parse(String). May optionally be preceded by "maven" followed by a colon and zero or more forward slashes, e.g. maven://group:artifact:version- Returns:
- the
MavenResource
-
getClassLoader
Returns theClassLoaderfor this ResourceLoader.- Specified by:
getClassLoaderin interfaceorg.springframework.core.io.ResourceLoader
-