title: Spring MVC NoSuchRequestHandlingMethodExecption
body: <p>I've searched through here but I can't find anything that solves my strange problem. I inherited some code that's using Spring MVC, Tiles, JSP. I'm trying to convert the code to use a more ReST API. So far I've been able to convert some GET requests to send JSON, but POST doesn't seem to be working. </p>
  
  <p>I have a simple post mapping in my controller:</p>
  
  <pre><code>@RequestMapping(value = "/save", method = RequestMethod.POST, headers = MediaType.APPLICATION_JSON)
  public void save(@RequestBody List&lt;Map&lt;String, String&gt;&gt; test){
    Map&lt;String, String&gt; input = Maps.newHashMap();
    for(Map&lt;String, String&gt; x : test){
       input.putAll(i);
    }
    System.out.println(input);
  }
  </code></pre>
  
  <p>I have the standard web.xml that uses DispatcherServlet and the mapping is /</p>
  
  <p>My mvc config xml is:</p>
  
  <pre><code> &lt;!-- Scans the classpath of this application for @Components to deploy as beans --&gt;
  &lt;context:component-scan base-package="com.unibet.livebannerservice"/&gt;
  &lt;context:annotation-config/&gt;
  
  &lt;!-- Basic MVC config --&gt;
  &lt;mvc:annotation-driven /&gt;
  &lt;mvc:resources mapping="/resources/**" location="/resources/"/&gt;
  
  
  &lt;bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver"&gt;
          &lt;property name="defaultContentType" value="text/html"/&gt;
          &lt;property name="ignoreAcceptHeader" value="true"/&gt;
          &lt;property name="favorPathExtension" value="true"/&gt;
          &lt;property name="order" value="1"/&gt;
          &lt;property name="mediaTypes"&gt;
              &lt;map&gt;
                  &lt;entry key="html" value="text/html"/&gt;
                  &lt;entry key="json" value="application/json"/&gt;
              &lt;/map&gt;
          &lt;/property&gt;
          &lt;property name="viewResolvers"&gt;
              &lt;list&gt;
                  &lt;bean class="org.springframework.web.servlet.view.BeanNameViewResolver"/&gt;
                  &lt;!-- Use tiles2 for views --&gt;
                  &lt;bean class="org.springframework.web.servlet.view.UrlBasedViewResolver"&gt;
                      &lt;property name="viewClass" value="org.springframework.web.servlet.view.tiles2.TilesView" /&gt;
                  &lt;/bean&gt;
              &lt;/list&gt;
          &lt;/property&gt;
          &lt;property name="defaultViews"&gt;
              &lt;list&gt;
                  &lt;ref bean="jsonView"/&gt;
              &lt;/list&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  &lt;bean id="jsonView" class="org.springframework.web.servlet.view.json.MappingJacksonJsonView"&gt;
      &lt;property name="contentType" value="application/json;charset=UTF-8"/&gt;        
  &lt;/bean&gt;
  &lt;bean id="tilesConfigurer"
        class="org.springframework.web.servlet.view.tiles2.TilesConfigurer"&gt;
      &lt;property name="definitions"&gt;
          &lt;list&gt;
              &lt;value&gt;/WEB-INF/jsp/tiles/tiles.xml&lt;/value&gt;                
          &lt;/list&gt;
      &lt;/property&gt;
      &lt;property name="checkRefresh" value="true" /&gt;
  &lt;/bean&gt;
  &lt;/beans&gt;
  </code></pre>
  
  <p>On the frontend I have a simple button that makes and ajax post request to the server.</p>
  
  <pre><code>$.ajax({
  url: 'mypath/save',
  contentType: 'applicatoin/json',
  type: 'POST',
  data: JSON.stringify({name:'John',value:'Doe'}),
  success: function(data){
  console.log(data);
  });
  </code></pre>
  
  <p>Whenever I try to post I get and </p>
  
  <pre><code>org.springframework.web.servlet.mvc.multiaction.NoSuchRequestHandlingMethodException: No matching handler method found for servlet request: path '/mypath/save', method: 'POST', parameters map['{"key":"John","value":"Doe"}' -&gt; array[']]]
  </code></pre>
  
  <p>I'm lost. My next step is to just start from scratch and create the ReST api from a simple tutorial and then try and bring tiles back into the fold.</p>