title: Enable HTTP Request POST in Spring Boot
body: <p>I am using Spring boot, here the maven dependency</p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>For the web pages I am placing the files in src/main/resources/static. There I have my html files, js libraries (angular, jquery), and css files.</p>
  
  <p>I am trying to make an HTTP Request POST with Angular (I also have a GET Request that is working fine) but I get this</p>
  
  <pre><code>POST http://localhost:8080/xxxx/12/addEntry 405 (Method Not Allowed) 
  </code></pre>
  
  <p>In the Response Headers</p>
  
  <pre><code>HTTP/1.1 405 Method Not Allowed
  Server: Apache-Coyote/1.1
  X-Application-Context: application
  Allow: HEAD, GET
  Content-Type: application/json;charset=UTF-8
  Transfer-Encoding: chunked
  Date: Wed, 09 Jul 2014 13:04:05 GMT
  </code></pre>
  
  <p>I realize that in the Response the allow doesn't have the POST method.</p>
  
  <p>The method in the controller</p>
  
  <pre><code>@RequestMapping(value = "/xxxx/{uid}/addEntry", method = RequestMethod.POST)
  @ResponseBody
  public String createEntry(@PathVariable String uid, @RequestBody  String form) {
      System.out.println(form);
      return "index.html";
  }
  </code></pre>