public class DataSourceClassPathResolver extends DataSourceBaseResolver
DataSource
based on an class path.Constructor and Description |
---|
DataSourceClassPathResolver()
Constructor
|
DataSourceClassPathResolver(String classPathBase)
Constructor.
|
DataSourceClassPathResolver(String classPathBase,
boolean lenient)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getClassPathBase() |
DataSource |
resolve(String resourceLocation)
Resolves the given resource location to a
DataSource . |
DataSource |
resolve(String resourceLocation,
boolean isLenient)
Resolves the given resource location to a
DataSource . |
isCid, isFileUrl, isHttpUrl, isLenient
public DataSourceClassPathResolver()
public DataSourceClassPathResolver(String classPathBase)
classPathBase
- a base class pathpublic DataSourceClassPathResolver(String classPathBase, boolean lenient)
classPathBase
- a base class pathlenient
- shall we ignore resources not found or throw an exception?public String getClassPathBase()
public DataSource resolve(String resourceLocation) throws IOException
DataSource
.resourceLocation
- the location of the resourceDataSource
IOException
- the resource was not foundpublic DataSource resolve(String resourceLocation, boolean isLenient) throws IOException
DataSource
.resourceLocation
- the location of the resourceisLenient
- shall we ignore resources not found or complain with an exception?IOException
- resolving the resource failedCopyright © 2001–2017 The Apache Software Foundation. All rights reserved.