title: Error creating beans name with contactService and Injection of autowired dependency failed
body: <p><strong>ERRORS</strong></p>
  
  <pre><code>INFO : org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization started
  INFO : org.springframework.web.context.support.XmlWebApplicationContext - Refreshing Root WebApplicationContext: startup date [Tue Sep 30 16:01:51 NPT 2014]; root of context hierarchy
  INFO : org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/spring/root-context.xml]
  INFO : org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [datasource-tx-jpa.xml]
  INFO : org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor - JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
  WARN : org.springframework.web.context.support.XmlWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt
  org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'contactService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.info.ch17.respository.ContactRepository com.info.ch17.service.jpa.ContactServiceImpl.contactRepository; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.info.ch17.respository.ContactRepository] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
      at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:326)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1204)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:538)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:229)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:725)
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
      at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
      at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
      at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4760)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5184)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)
      at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:581)
      at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1686)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:722)
  Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.info.ch17.respository.ContactRepository com.info.ch17.service.jpa.ContactServiceImpl.contactRepository; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.info.ch17.respository.ContactRepository] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
      at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:542)
      at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
      at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:323)
      ... 27 more
  Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.info.ch17.respository.ContactRepository] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:1261)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1009)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:904)
      at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:514)
      ... 29 more
  ERROR: org.springframework.web.context.ContextLoader - Context initialization failed
  </code></pre>
  
  <p><strong>schema.sql</strong></p>
  
  <pre><code>DROP TABLE IF EXISTS CONTACT;
  CREATE TABLE CONTACT (
  ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY
  , FIRST_NAME VARCHAR(60) NOT NULL
  , LAST_NAME VARCHAR(40) NOT NULL
  , BIRTH_DATE DATE
  , DESCRIPTION VARCHAR(2000)
  , PHOTO BLOB
  , VERSION INT NOT NULL DEFAULT 0
  , UNIQUE UQ_CONTACT_1 (FIRST_NAME, LAST_NAME)
  
  );
  </code></pre>
  
  <p><strong>test-schema.sql</strong></p>
  
  <pre><code>insert into contact (first_name, last_name, birth_date) values ('Clarence', 'Ho', '1980-07-30');
  insert into contact (first_name, last_name, birth_date) values ('Scott', 'Tiger', '1990-11-02');
  insert into contact (first_name, last_name, birth_date) values ('John', 'Smith', '1964-02-28');
  insert into contact (first_name, last_name, birth_date) values ('Peter', 'Jackson', '1944-1-10');
  insert into contact (first_name, last_name, birth_date) values ('Jacky', 'Chan', '1955-10-31');
  insert into contact (first_name, last_name, birth_date) values ('Susan', 'Boyle', '1970-05-06');
  insert into contact (first_name, last_name, birth_date) values ('Tinner', 'Turner', '1967-04-30');
  insert into contact (first_name, last_name, birth_date) values ('Lotus', 'Notes', '1990-02-28');
  insert into contact (first_name, last_name, birth_date) values ('Henry', 'Dickson', '1997-06-30');
  insert into contact (first_name, last_name, birth_date) values ('Sam', 'Davis', '2001-01-31');
  insert into contact (first_name, last_name, birth_date) values ('Max', 'Beckham', '2002-02-01');
  insert into contact (first_name, last_name, birth_date) values ('Paul', 'Simon', '2002-02-28');
  </code></pre>
  
  <p><strong>**datasource-tx-jpa.xml**</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;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:jdbc="http://www.springframework.org/schema/jdbc"
  xmlns:jpa="http://www.springframework.org/schema/data/jpa"
  xmlns:tx="http://www.springframework.org/schema/tx"
  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.xsd
  http://www.springframework.org/schema/jdbc
  http://www.springframework.org/schema/jdbc/spring-jdbc-3.1.xsd
  http://www.springframework.org/schema/data/jpa
  http://www.springframework.org/schema/data/jpa/spring-jpa-1.2.xsd
  http://www.springframework.org/schema/tx
  http://www.springframework.org/schema/tx/spring-tx-3.1.xsd"&gt;
  
  
  &lt;jdbc:embedded-database id="dataSource" type="H2"&gt;
  &lt;jdbc:script location="classpath:schema.sql"/&gt;
  &lt;jdbc:script location="classpath:test-data.sql"/&gt;
  &lt;/jdbc:embedded-database&gt;
  &lt;bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"&gt;
  &lt;property name="entityManagerFactory" ref="emf"/&gt;
  &lt;/bean&gt;
  &lt;tx:annotation-driven transaction-manager="transactionManager" /&gt;
  &lt;bean id="emf" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"&gt;
  &lt;property name="dataSource" ref="dataSource" /&gt;
  &lt;property name="jpaVendorAdapter"&gt;
  &lt;bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" /&gt;
  &lt;/property&gt;
  &lt;property name="packagesToScan" value="com.apress.spring3.ch16.domain"/&gt;
  &lt;property name="jpaProperties"&gt;
  &lt;props&gt;
  &lt;prop key="hibernate.dialect"&gt;
  org.hibernate.dialect.H2Dialect
  &lt;/prop&gt;
  &lt;prop key="hibernate.max_fetch_depth"&gt;3&lt;/prop&gt;
  &lt;prop key="hibernate.jdbc.fetch_size"&gt;50&lt;/prop&gt;
  &lt;prop key="hibernate.jdbc.batch_size"&gt;10&lt;/prop&gt;
  &lt;prop key="hibernate.show_sql"&gt;true&lt;/prop&gt;
  &lt;/props&gt;
  &lt;/property&gt;
  &lt;/bean&gt;
  &lt;context:annotation-config/&gt;
  &lt;jpa:repositories base-package="com.apress.spring3.ch16.repository"
  entity-manager-factory-ref="emf"
  transaction-manager-ref="transactionManager"/&gt;
  &lt;/beans&gt;
  </code></pre>
  
  <p><strong>web.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"&gt;
  
      &lt;!-- The definition of the Root Spring Container shared by all Servlets and Filters --&gt;
      &lt;context-param&gt;
          &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
          &lt;param-value&gt;/WEB-INF/spring/root-context.xml&lt;/param-value&gt;
      &lt;/context-param&gt;
      &lt;!-- Spring MVC Filter  --&gt;
      &lt;filter&gt;&lt;filter-name&gt;CharacterEncodingFilter&lt;/filter-name&gt;
      &lt;filter-class&gt;org.springframework.web.filter.CharacterEncodingFilter&lt;/filter-class&gt;
      &lt;init-param&gt;
      &lt;param-name&gt;encoding&lt;/param-name&gt;
      &lt;param-value&gt;UTF-8&lt;/param-value&gt;
      &lt;/init-param&gt;
      &lt;init-param&gt;
      &lt;param-name&gt;ForceEncoding&lt;/param-name&gt;
      &lt;param-value&gt;true&lt;/param-value&gt;
      &lt;/init-param&gt;
      &lt;/filter&gt;
      &lt;filter&gt;
      &lt;filter-name&gt;
      HttpMethodFilter
      &lt;/filter-name&gt;
      &lt;filter-class&gt;org.springframework.web.filter.HiddenHttpMethodFilter&lt;/filter-class&gt;
      &lt;/filter&gt;
      &lt;filter&gt;
      &lt;filter-name&gt;
      Spring OpenEntityManagerInViewFilter
      &lt;/filter-name&gt;
      &lt;filter-class&gt;org.springframework.orm.jpa.support.OpenEntityMangerInViewFilter&lt;/filter-class&gt;
      &lt;/filter&gt;
      &lt;!-- Filter Mapping --&gt;
  
  
  
      &lt;!-- Creates the Spring Container shared by all Servlets and Filters --&gt;
      &lt;listener&gt;
          &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
      &lt;/listener&gt;
  
      &lt;!-- Processes application requests --&gt;
      &lt;servlet&gt;
          &lt;servlet-name&gt;appServlet&lt;/servlet-name&gt;
          &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
              &lt;param-value&gt;/WEB-INF/spring/appServlet/servlet-context.xml&lt;/param-value&gt;
          &lt;/init-param&gt;
          &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
      &lt;/servlet&gt;
  
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;appServlet&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  
  &lt;/web-app&gt;
  </code></pre>
  
  <p><strong>root context.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;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"
  xsi:schemaLocation="http://www.springframework.org/schema/beans
  http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
  http://www.springframework.org/schema/context
  http://www.springframework.org/schema/context/spring-context-4.1.xsd"&gt;
  &lt;import resource="classpath:datasource-tx-jpa.xml" /&gt;
  &lt;context:component-scan base-package="com.info.ch17.service" /&gt;
  &lt;/beans&gt;
  </code></pre>
  
  <p><strong>Servlet-context.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans:beans xmlns="http://www.springframework.org/schema/mvc"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:beans="http://www.springframework.org/schema/beans"
      xmlns:context="http://www.springframework.org/schema/context"
      xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd
          http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
          http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd"&gt;
  
      &lt;!-- DispatcherServlet Context: defines this servlet's request-processing infrastructure --&gt;
  
      &lt;!-- Enables the Spring MVC @Controller programming model --&gt;
      &lt;annotation-driven /&gt;
  
      &lt;!-- Handles HTTP GET requests for /resources/** by efficiently serving up static resources in the ${webappRoot}/resources directory --&gt;
      &lt;resources mapping="/resources/**" location="/resources/" /&gt;
  
      &lt;!-- Resolves views selected for rendering by @Controllers to .jsp resources in the /WEB-INF/views directory --&gt;
      &lt;beans:bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
          &lt;beans:property name="prefix" value="/WEB-INF/views/" /&gt;
          &lt;beans:property name="suffix" value=".jspx" /&gt;
      &lt;/beans:bean&gt;
  
      &lt;context:component-scan base-package="com.info.ch17.we.controller" /&gt;
  
  
  
  &lt;/beans:beans&gt;
  </code></pre>
  
  <p><strong>Contact CLASS</strong></p>
  
  <pre><code>package com.info.ch17.domain;
  
  import java.io.Serializable;
  
  import javax.persistence.*;
  
  import org.hibernate.annotations.Type;
  import org.joda.time.DateTime;
  import org.springframework.format.annotation.DateTimeFormat;
  import org.springframework.format.annotation.DateTimeFormat.ISO;
  
  import static javax.persistence.GenerationType.IDENTITY;
  
  @Entity
  @Table(name="contact")
   public class Contact implements Serializable{
  
  /**
   * 
   */
  private static final long serialVersionUID = 1572699331590746106L;
  private Long id;
  private String firstName;
  private String lastName;
  private int version;
  private String description;
  private DateTime birthDate;
  private byte[] photo;
  @Id
  @GeneratedValue(strategy = IDENTITY)
  @Column(name="ID")
  public Long getId() {
      return id;
  }
  public void setId(Long id) {
      this.id = id;
  }
  @Column(name="FIRST_NAME")
  public String getFirstName() {
      return firstName;
  }
  public void setFirstName(String firstName) {
      this.firstName = firstName;
  }
  @Column(name="LAST_NAME")
  public String getLastName() {
      return lastName;
  }
  public void setLastName(String lastName) {
      this.lastName = lastName;
  }
  @Column(name="DESCRIPTION")
  public String getDescription() {
      return description;
  }
  public void setDescription(String description) {
      this.description = description;
  }
  @Basic(fetch=FetchType.LAZY)
  @Lob
  @Column(name="PHOTO")
  public byte[] getPhoto() {
      return photo;
  }
  public void setPhoto(byte[] photo) {
      this.photo = photo;
  }
  @Column(name = "BIRTH_DATE")
  @Type(type= "org.joda.time.contrib.hibernate.PersistentDateTime")
  @DateTimeFormat(iso = ISO.DATE)
  public DateTime getBirthDate() {
      return birthDate;
  }
  public void setBirthDate(DateTime datetime) {
      this.birthDate = datetime;
  }
  @Version
  @Column(name ="VERSION")
  public int getVersion() {
      return version;
  }
  public void setVersion(int version) {
      this.version = version;
  }
  @Transient
  public String getBirthDateString(){
      String birthDateString="";
      birthDateString = org.joda.time.format.DateTimeFormat.forPattern("yyyy-mm-dd").print(this.birthDate);
      return birthDateString;
  }
  public String toString() {
      return "Contact - Id: " + id + ", First name: " + firstName
      + ", Last name: " + lastName + ", Birthday: " + birthDate
      + ", Description: " + description;
      }
  </code></pre>
  
  <p>}</p>
  
  <p><strong>CONTACT RESPOSITORY CLASS</strong></p>
  
  <pre><code>package com.info.ch17.respository;
  
  import org.springframework.data.repository.CrudRepository;
  
  import com.info.ch17.domain.Contact;
  
  public interface ContactRepository extends CrudRepository&lt;Contact, Long&gt; {
  </code></pre>
  
  <p>}</p>
  
  <p><strong>Contact Service Class</strong></p>
  
  <pre><code>package com.info.ch17.service;
  
  import java.util.List;
  
  import com.info.ch17.domain.Contact;
  
  public interface ContactService {
  
  public List&lt;Contact&gt; findAll();
  public Contact findById(Long id);
  public Contact Save(Contact contact);
  }
  </code></pre>
  
  <p><strong>Contact Service Implemenation Class</strong></p>
  
  <pre><code>package com.info.ch17.service.jpa;
  import java.util.List;
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.stereotype.Repository;
  import org.springframework.stereotype.Service;
  import org.springframework.transaction.annotation.Transactional;
  
  import com.info.ch17.domain.Contact;
  import com.info.ch17.respository.ContactRepository;
  import com.info.ch17.service.ContactService;
  import com.google.common.collect.Lists;
  
  @Service("contactService")
  @Repository
  @Transactional
  public class ContactServiceImpl implements ContactService {
  @Autowired
  private ContactRepository contactRepository;
  
  @Override
  @Transactional(readOnly= true)
  public List&lt;Contact&gt; findAll() {
      // TODO Auto-generated method stub
      return Lists.newArrayList(contactRepository.findAll());
  }
  
  @Override
  @Transactional(readOnly = true)
  public Contact findById(Long id) {
      // TODO Auto-generated method stub
      return contactRepository.findOne(id);
  }
  
  @Override
  public Contact Save(Contact contact) {
      // TODO Auto-generated method stub
      return contactRepository.save(contact);
  }
  </code></pre>
  
  <p>}</p>
  
  <p><strong>Controller Class</strong></p>
  
  <pre><code>package com.info.ch17.web.controller;
  
  import java.util.List;
  
  import org.slf4j.Logger;
  import org.slf4j.LoggerFactory;
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.stereotype.Controller;
  import org.springframework.ui.Model;
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.bind.annotation.RequestMethod;
  
  import com.info.ch17.domain.Contact;
  import com.info.ch17.service.ContactService;
  
  @RequestMapping("/contacts")
  @Controller
  public class ContactContoller {
   final Logger logger = LoggerFactory.getLogger(ContactContoller.class);
   @Autowired
   private ContactService contactService;
   @RequestMapping(method = RequestMethod.GET)
   public String list(Model uiModel) {
   logger.info("Listing contacts");
   List&lt;Contact&gt; contacts = contactService.findAll();
   uiModel.addAttribute("contacts", contacts);
   logger.info("No. of contacts: " + contacts.size());
   return "contacts/list";
  }
  }
  </code></pre>
  
  <p><strong>MavenDependency</strong></p>
  
  <pre><code>   &lt;?xml version="1.0" encoding="UTF-8"?&gt;
     &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-       instance"
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;
     &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;groupId&gt;com.info&lt;/groupId&gt;
  &lt;artifactId&gt;ch17&lt;/artifactId&gt;
  &lt;name&gt;ch17&lt;/name&gt;
  &lt;packaging&gt;war&lt;/packaging&gt;
  &lt;version&gt;1.0.0-BUILD-SNAPSHOT&lt;/version&gt;
  &lt;properties&gt;
      &lt;java-version&gt;1.6&lt;/java-version&gt;
      &lt;org.springframework-version&gt;4.1.0.RELEASE&lt;/org.springframework-version&gt;
      &lt;org.aspectj-version&gt;1.8.2&lt;/org.aspectj-version&gt;
      &lt;org.slf4j-version&gt;1.7.7&lt;/org.slf4j-version&gt;
  &lt;/properties&gt;
  &lt;dependencies&gt;
      &lt;!-- Spring --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-context&lt;/artifactId&gt;
          &lt;version&gt;${org.springframework-version}&lt;/version&gt;
          &lt;exclusions&gt;
              &lt;!-- Exclude Commons Logging in favor of SLF4j --&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;commons-logging&lt;/groupId&gt;
                  &lt;artifactId&gt;commons-logging&lt;/artifactId&gt;
               &lt;/exclusion&gt;
          &lt;/exclusions&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-webmvc&lt;/artifactId&gt;
          &lt;version&gt;4.1.0.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;!-- AspectJ --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.aspectj&lt;/groupId&gt;
          &lt;artifactId&gt;aspectjrt&lt;/artifactId&gt;
          &lt;version&gt;${org.aspectj-version}&lt;/version&gt;
      &lt;/dependency&gt;   
  
      &lt;!-- Logging --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
          &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
          &lt;version&gt;1.7.7&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
          &lt;artifactId&gt;jcl-over-slf4j&lt;/artifactId&gt;
          &lt;version&gt;1.7.7&lt;/version&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
          &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
          &lt;version&gt;1.7.7&lt;/version&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;log4j&lt;/groupId&gt;
          &lt;artifactId&gt;log4j&lt;/artifactId&gt;
          &lt;version&gt;1.2.15&lt;/version&gt;
          &lt;exclusions&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;javax.mail&lt;/groupId&gt;
                  &lt;artifactId&gt;mail&lt;/artifactId&gt;
              &lt;/exclusion&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;javax.jms&lt;/groupId&gt;
                  &lt;artifactId&gt;jms&lt;/artifactId&gt;
              &lt;/exclusion&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;com.sun.jdmk&lt;/groupId&gt;
                  &lt;artifactId&gt;jmxtools&lt;/artifactId&gt;
              &lt;/exclusion&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;com.sun.jmx&lt;/groupId&gt;
                  &lt;artifactId&gt;jmxri&lt;/artifactId&gt;
              &lt;/exclusion&gt;
          &lt;/exclusions&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;!-- @Inject --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.inject&lt;/groupId&gt;
          &lt;artifactId&gt;javax.inject&lt;/artifactId&gt;
          &lt;version&gt;1&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;!-- Servlet --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
          &lt;artifactId&gt;servlet-api&lt;/artifactId&gt;
          &lt;version&gt;2.5&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet.jsp&lt;/groupId&gt;
          &lt;artifactId&gt;jsp-api&lt;/artifactId&gt;
          &lt;version&gt;2.1&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
          &lt;artifactId&gt;jstl&lt;/artifactId&gt;
          &lt;version&gt;1.2&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;!-- Test --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;junit&lt;/groupId&gt;
          &lt;artifactId&gt;junit&lt;/artifactId&gt;
          &lt;version&gt;4.7&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-beans&lt;/artifactId&gt;
          &lt;version&gt;4.1.0.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-jdbc&lt;/artifactId&gt;
          &lt;version&gt;4.1.0.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-orm&lt;/artifactId&gt;
          &lt;version&gt;4.1.0.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-tx&lt;/artifactId&gt;
          &lt;version&gt;4.1.0.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.data&lt;/groupId&gt;
          &lt;artifactId&gt;spring-data-jpa&lt;/artifactId&gt;
          &lt;version&gt;1.7.0.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-validator&lt;/artifactId&gt;
          &lt;version&gt;4.2.0.Final&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-entitymanager&lt;/artifactId&gt;
          &lt;version&gt;3.6.8.Final&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.validation&lt;/groupId&gt;
          &lt;artifactId&gt;validation-api&lt;/artifactId&gt;
          &lt;version&gt;1.0.0.GA&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.h2database&lt;/groupId&gt;
          &lt;artifactId&gt;h2&lt;/artifactId&gt;
          &lt;version&gt;1.3.160&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;joda-time&lt;/groupId&gt;
          &lt;artifactId&gt;joda-time&lt;/artifactId&gt;
          &lt;version&gt;2.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;joda-time&lt;/groupId&gt;
          &lt;artifactId&gt;joda-time-hibernate&lt;/artifactId&gt;
          &lt;version&gt;1.3&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;joda-time&lt;/groupId&gt;
          &lt;artifactId&gt;joda-time-jsptags&lt;/artifactId&gt;
          &lt;version&gt;1.1.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-core&lt;/artifactId&gt;
          &lt;version&gt;4.1.0.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.google.guava&lt;/groupId&gt;
          &lt;artifactId&gt;guava&lt;/artifactId&gt;
          &lt;version&gt;18.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-aspects&lt;/artifactId&gt;
          &lt;version&gt;4.1.0.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-aop&lt;/artifactId&gt;
          &lt;version&gt;4.1.0.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;artifactId&gt;maven-eclipse-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.9&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;additionalProjectnatures&gt;
                      &lt;projectnature&gt;org.springframework.ide.eclipse.core.springnature&lt;/projectnature&gt;
                  &lt;/additionalProjectnatures&gt;
                  &lt;additionalBuildcommands&gt;
                      &lt;buildcommand&gt;org.springframework.ide.eclipse.core.springbuilder&lt;/buildcommand&gt;
                  &lt;/additionalBuildcommands&gt;
                  &lt;downloadSources&gt;true&lt;/downloadSources&gt;
                  &lt;downloadJavadocs&gt;true&lt;/downloadJavadocs&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.5.1&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;source&gt;1.6&lt;/source&gt;
                  &lt;target&gt;1.6&lt;/target&gt;
                  &lt;compilerArgument&gt;-Xlint:all&lt;/compilerArgument&gt;
                  &lt;showWarnings&gt;true&lt;/showWarnings&gt;
                  &lt;showDeprecation&gt;true&lt;/showDeprecation&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
              &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;1.2.1&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;mainClass&gt;org.test.int1.Main&lt;/mainClass&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p></p>