public class SpringResourceLoader
extends org.apache.velocity.runtime.resource.loader.ResourceLoader
java.io.File.
Note that this loader does not allow for modification detection:
Use Velocity's default FileResourceLoader for java.io.File
resources.
Expects "spring.resource.loader" and "spring.resource.loader.path"
application attributes in the Velocity runtime: the former of type
org.springframework.core.io.ResourceLoader, the latter a String.
VelocityEngineFactory.setResourceLoaderPath(java.lang.String),
ResourceLoader,
FileResourceLoader| 限定符和类型 | 字段和说明 |
|---|---|
protected org.apache.commons.logging.Log |
logger |
static String |
NAME |
static String |
SPRING_RESOURCE_LOADER |
static String |
SPRING_RESOURCE_LOADER_CACHE |
static String |
SPRING_RESOURCE_LOADER_CLASS |
static String |
SPRING_RESOURCE_LOADER_PATH |
| 构造器和说明 |
|---|
SpringResourceLoader() |
| 限定符和类型 | 方法和说明 |
|---|---|
long |
getLastModified(org.apache.velocity.runtime.resource.Resource resource) |
InputStream |
getResourceStream(String source) |
void |
init(org.apache.commons.collections.ExtendedProperties configuration) |
boolean |
isSourceModified(org.apache.velocity.runtime.resource.Resource resource) |
public void init(org.apache.commons.collections.ExtendedProperties configuration)
init 在类中 org.apache.velocity.runtime.resource.loader.ResourceLoaderpublic InputStream getResourceStream(String source) throws org.apache.velocity.exception.ResourceNotFoundException
getResourceStream 在类中 org.apache.velocity.runtime.resource.loader.ResourceLoaderorg.apache.velocity.exception.ResourceNotFoundExceptionpublic boolean isSourceModified(org.apache.velocity.runtime.resource.Resource resource)
isSourceModified 在类中 org.apache.velocity.runtime.resource.loader.ResourceLoaderpublic long getLastModified(org.apache.velocity.runtime.resource.Resource resource)
getLastModified 在类中 org.apache.velocity.runtime.resource.loader.ResourceLoaderCopyright © 2022. All rights reserved.