类 VelocityEngineFactoryBean
java.lang.Object
cn.aradin.spring.velocity.ui.VelocityEngineFactory
cn.aradin.spring.velocity.ui.VelocityEngineFactoryBean
- 所有已实现的接口:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.FactoryBean<org.apache.velocity.app.VelocityEngine>,org.springframework.beans.factory.InitializingBean,org.springframework.context.ResourceLoaderAware
public class VelocityEngineFactoryBean
extends VelocityEngineFactory
implements org.springframework.beans.factory.FactoryBean<org.apache.velocity.app.VelocityEngine>, org.springframework.beans.factory.InitializingBean, org.springframework.context.ResourceLoaderAware
Factory bean that configures a VelocityEngine and provides it as bean
reference. This bean is intended for any kind of usage of Velocity in
application code, e.g. for generating email content. For web views,
VelocityConfigurer is used to set up a VelocityEngine for views.
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.
-
字段概要
从类继承的字段 cn.aradin.spring.velocity.ui.VelocityEngineFactory
logger从接口继承的字段 org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidorg.apache.velocity.app.VelocityEngineClass<? extends org.apache.velocity.app.VelocityEngine>boolean从类继承的方法 cn.aradin.spring.velocity.ui.VelocityEngineFactory
createVelocityEngine, getResourceLoader, initSpringResourceLoader, initVelocityResourceLoader, isPreferFileSystemAccess, newVelocityEngine, postProcessVelocityEngine, setConfigLocation, setPreferFileSystemAccess, setResourceLoader, setResourceLoaderPath, setVelocityProperties, setVelocityPropertiesMap从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 org.springframework.context.ResourceLoaderAware
setResourceLoader
-
构造器详细资料
-
VelocityEngineFactoryBean
public VelocityEngineFactoryBean()
-
-
方法详细资料
-
afterPropertiesSet
public void afterPropertiesSet() throws IOException, org.apache.velocity.exception.VelocityException- 指定者:
afterPropertiesSet在接口中org.springframework.beans.factory.InitializingBean- 抛出:
IOExceptionorg.apache.velocity.exception.VelocityException
-
getObject
public org.apache.velocity.app.VelocityEngine getObject()- 指定者:
getObject在接口中org.springframework.beans.factory.FactoryBean<org.apache.velocity.app.VelocityEngine>
-
getObjectType
- 指定者:
getObjectType在接口中org.springframework.beans.factory.FactoryBean<org.apache.velocity.app.VelocityEngine>
-
isSingleton
public boolean isSingleton()- 指定者:
isSingleton在接口中org.springframework.beans.factory.FactoryBean<org.apache.velocity.app.VelocityEngine>
-