Velocity is the templating language provided by Apache. It can be integrated into the Spring view layer easily. The latest Velocity version used during this book is 1.7. In the previous section, we demonstrated using Velocity to send e-mails using the
@Configuration annotations. In this section, we shall see how we can configure Velocity to send mails using XML configuration.
All that needs to be done is to add the following bean definition to the
.xml file. In the case of
mvc, you can add it to the
<bean id="velocityEngine" class="org.springframework.ui.velocity.VelocityEngineFactoryBean"> <property name="velocityProperties"> <value> resource.loader=class ...