title: Java Spring MVC - Send JSON request body error
body: <p>I am trying to send a JSON string as a request to my application. This is my code: </p>
  
  <pre><code>@RequestMapping(
          value = "/mylink/upload",
          method = RequestMethod.POST,
          consumes ="application/json",
          produces = "application/json")
  public
  @ResponseBody
  List&lt;Upload&gt; upload(
          @RequestParam(value = "hdfsLocation") String hdfsLocation
  
  ) throws Exception {
      return S3HdfsTransfer.uploadFromHDFS(hdfsLocation);
  }
  </code></pre>
  
  <p>I am trying to send a request with Postman. The method I use is POST, the header contains: Accept "application/json",Content-Type "application/json", the request body is the following:</p>
  
  <pre><code>{
      "hdfsLocation" : "hdfs://145.160.10.10:8020"
  }
  </code></pre>
  
  <p>This is the response I get. If I put the parameter in the URL, it works.</p>
  
  <pre><code>{
    "httpStatus": 500,
    "appErrorId": 0,
    "message": "Required String parameter 'hdfsLocation' is not present",
    "trackingId": "8c6d45fd-2da5-47ea-a213-3d4ea5764681"
  }
  </code></pre>
  
  <p>Any idea what I am doing wrong?</p>
  
  <p>Thanks,
  Serban</p>