<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:context="http://www.springframework.org/schema/context"
  xmlns:mvc="http://www.springframework.org/schema/mvc"
  xsi:schemaLocation="http://www.springframework.org/schema/beans
  http://www.springframework.org/schema/beans/spring-beans.xsd
      http://www.springframework.org/schema/context
      http://www.springframework.org/schema/context/spring-context-4.1.xsd
      http://www.springframework.org/schema/mvc
      http://www.springframework.org/schema/mvc/spring-mvc-4.1.xsd">
 
 
  <!-- Register the annotated components in the container eg : annotated controllers -->
  <context:component-scan base-package="com.baeldung.mvc.velocity.*" />
 
  <!-- Tell the container that we are going to use annotations -->
  <context:annotation-config />
 
 
 
  <bean id="velocityConfig"
      class="org.springframework.web.servlet.view.velocity.VelocityConfigurer">
      <property name="resourceLoaderPath">
          <value>/</value>
      </property>
  </bean>
 
 
  <bean id="viewResolver"
      class="org.springframework.web.servlet.view.velocity.VelocityLayoutViewResolver">
      <property name="cache" value="true" />
      <property name="prefix" value="/WEB-INF/views/" />
      <property name="layoutUrl" value="/WEB-INF/layouts/layout.vm" />
      <property name="suffix" value=".vm" />
  </bean>
 
</beans>