title: Error while executing post request in spring mvc
body: <p>While Executing the following post request in postman: </p>
  
  <pre><code>http://localhost:8080/FinalSmsApi/rest/requestSms/hello
  </code></pre>
  
  <p>with parameter username,password and phone . 
  I am getting the following error : </p>
  
  <pre><code>HTTP Status 415: The server refused this request because the request entity is in a format not supported by the requested resource for the requested method
  </code></pre>
  
  <p>This is the controller:</p>
  
  <pre><code>@RestController
  public class MainController1 {
      @RequestMapping(value = "/hello", method = POST, consumes = "application/json")
      public void Register(@RequestParam(value = "username") String username,
                           @RequestParam(value = "password") String password,
                           @RequestParam(value = "phone") String phone) {...}
  }
  </code></pre>
  
  <p>Using Spring 4 version.</p>