public class MavenResourceLoader extends Object implements org.springframework.core.io.ResourceLoader
ResourceLoader
that loads MavenResource
s from locations of the format
maven://<coordinates> where the value for "coordinates" conforms to the rules
described on MavenResource.parse(String)
Constructor and Description |
---|
MavenResourceLoader(MavenProperties properties)
Create a
MavenResourceLoader that uses the provided MavenProperties . |
Modifier and Type | Method and Description |
---|---|
ClassLoader |
getClassLoader()
Returns the
ClassLoader for this ResourceLoader. |
org.springframework.core.io.Resource |
getResource(String location)
Returns a
MavenResource for the provided location. |
public MavenResourceLoader(MavenProperties properties)
MavenResourceLoader
that uses the provided MavenProperties
.properties
- the MavenProperties
to use when instantiating MavenResource
spublic org.springframework.core.io.Resource getResource(String location)
MavenResource
for the provided location.getResource
in interface org.springframework.core.io.ResourceLoader
location
- the coordinates conforming to the rules described on
MavenResource.parse(String)
. May optionally be preceded by
followed by a colon and zero or more forward slashes, e.g.
maven://group:artifact:versionMavenResource
public ClassLoader getClassLoader()
ClassLoader
for this ResourceLoader.getClassLoader
in interface org.springframework.core.io.ResourceLoader
Copyright © 2017 Pivotal Software, Inc.. All rights reserved.