public class VelocityEngineFactoryBean extends VelocityEngineFactory implements org.springframework.beans.factory.FactoryBean<VelocityEngine>, org.springframework.beans.factory.InitializingBean, org.springframework.context.ResourceLoaderAware
The simplest way to use this class is to specify a "resourceLoaderPath"; you do not need any further configuration then. For example, in a web application context:
<bean id="velocityEngine" class="org.springframework.ui.velocity.VelocityEngineFactoryBean"> <property name="resourceLoaderPath" value="/WEB-INF/velocity/"/> </bean>See the base class VelocityEngineFactory for configuration details.
VelocityEngineFactory.setConfigLocation(org.springframework.core.io.Resource), 
VelocityEngineFactory.setVelocityProperties(java.util.Properties), 
VelocityEngineFactory.setResourceLoaderPath(java.lang.String), 
org.springframework.web.servlet.view.velocity.VelocityConfigurerlogger| Constructor and Description | 
|---|
| VelocityEngineFactoryBean() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | afterPropertiesSet() | 
| VelocityEngine | getObject() | 
| Class<? extends VelocityEngine> | getObjectType() | 
| boolean | isSingleton() | 
createVelocityEngine, getResourceLoader, initSpringResourceLoader, initVelocityResourceLoader, isPreferFileSystemAccess, newVelocityEngine, postProcessVelocityEngine, setConfigLocation, setPreferFileSystemAccess, setResourceLoader, setResourceLoaderPath, setVelocityProperties, setVelocityPropertiesMappublic void afterPropertiesSet()
                        throws IOException,
                               VelocityException
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanIOExceptionVelocityExceptionpublic VelocityEngine getObject()
getObject in interface org.springframework.beans.factory.FactoryBean<VelocityEngine>public Class<? extends VelocityEngine> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBean<VelocityEngine>public boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.FactoryBean<VelocityEngine>Copyright © 2000–2021 The Apache Software Foundation. All rights reserved.