title: There is already 'controllers' bean method
body: <p>My dispatcher-servlet.xml </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: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-3.0.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd"&gt;
  
      &lt;context:component-scan base-package = "mvc"/&gt;
      &lt;bean class = "org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
          &lt;property name = "prefix" value = "/WEB-INF/pages/" /&gt;
          &lt;property name = "suffix" value = ".jsp" /&gt;
      &lt;/bean&gt;
  
      &lt;bean id = "dataSource" class = "org.springframework.jdbc.datasource.DriverManagerDataSource"&gt;
          &lt;property name = "driverClassName" value = "oracle.jdbc.driver.OracleDriver" /&gt;
          &lt;property name = "url" value = "jdbc:oracle:thin:@localhost:1521:XE" /&gt;
          &lt;property name = "username" value = ""/&gt;
          &lt;property name = "password" value = ""/&gt;
      &lt;/bean&gt;
  
      &lt;bean id = "jdbcTemplate" class = "org.springframework.jdbc.core.JdbcTemplate"&gt;
          &lt;property name = "dataSource" ref = "dataSource"/&gt;
      &lt;/bean&gt;
  
      &lt;bean id = "dao" class = "mvc.dao.DAOImpl"&gt;
          &lt;property name = "template" ref = "jdbcTemplate"/&gt;
      &lt;/bean&gt;
  &lt;/beans&gt;
  </code></pre>
  
  <p>For using REST i need <code>&lt;mvc:annotation-driven/&gt;</code>. But after adding it to dispatcher-servlet.xml I'm getting "There is already 'controllers' bean method".<br>
  Controllers class here <a href="http://collabedit.com/hfrv8" rel="nofollow noreferrer">http://collabedit.com/hfrv8</a><br>
  DAOimpl class here <a href="http://collabedit.com/dms4s" rel="nofollow noreferrer">http://collabedit.com/dms4s</a><br>
  Full stack trace here <a href="http://collabedit.com/f7ux9" rel="nofollow noreferrer">http://collabedit.com/f7ux9</a><br>
  Where problem could be? </p>