title: The DispatcherServlet configuration needs to include a HandlerAdapter that supports this handler
body: <p>I wanted to use both annotation mapping and xml mapping in Spring MVC. My <code>application-context.xml</code> as follows:</p>
  
  <pre><code>&lt;bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"&gt;
          &lt;property name="mappings"&gt;
              &lt;props&gt;
                  &lt;prop key="personal/account/history"&gt;accountHistoryController&lt;/prop&gt;
              &lt;/props&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  
      &lt;bean id="accountHistoryController" class="com.fg.banking.ib.controller.AccountHistoryController" /&gt;
  
      &lt;bean
          class="org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter"&gt;&lt;/bean&gt;
      &lt;context:annotation-config /&gt;
      &lt;mvc:annotation-driven /&gt;
      &lt;context:component-scan base-package="com.fg.banking.ib.controller, com.fg.banking.ib.helper, com.fg.banking.corporate.controller" /&gt;
  </code></pre>
  
  <p>I am getting the following error when I try to access the url. I have configured the SimpleControllerHandlerAdapter as above.</p>
  
  <pre><code>javax.servlet.ServletException: No adapter for handler 
  [com.fg.banking.ib.controller.AccountHistoryController@218531e6]: The DispatcherServlet configuration needs to include a HandlerAdapter that supports this handler
  org.springframework.web.servlet.DispatcherServlet.getHandlerAdapter(DispatcherServlet.java:1128)
  org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:903)
  org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
  org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
  org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827)
  </code></pre>
  
  <p>What to do?</p>