title: Content type 'text/plain;charset=UTF-8' not supported error in spring boot inside RestController class
body: <p>I got the following @RestController inside a spring boot application :</p>
  
  <pre><code>@Data
  @RestController
  public class Hello {
  
      @Autowired
      private ResturantExpensesRepo repo;
  
      @RequestMapping(value = "/expenses/restaurants",method = RequestMethod.POST,consumes =MediaType.APPLICATION_JSON_VALUE ,
              headers = MediaType.APPLICATION_JSON_VALUE)
      @ResponseBody
      public void hello(@RequestBody ResturantExpenseDto dto)
      {
          Logger logger = LoggerFactory.getLogger("a");
          logger.info("got a request");
  
          ResturantExpenseEntity resturantExpenseEntity = new ResturantExpenseEntity();
          resturantExpenseEntity.setDate(new Date(System.currentTimeMillis()));
          resturantExpenseEntity.setName(dto.getName());
          resturantExpenseEntity.setExpense(dto.getExpense());
          repo.save(resturantExpenseEntity);
      }
  }
  </code></pre>
  
  <p>When I try to send request from restClient/RestedClient (both addons of mozila) I get the following error :</p>
  
  <blockquote>
    <p>{
      "timestamp": 1512129442019,
      "status": 415,
      "error": "Unsupported Media Type",
      "message": "Content type 'text/plain;charset=UTF-8' not supported",
      "path": "/expenses/restaurants"
    }</p>
  </blockquote>
  
  <p>This eror states that the end point doesnt support Json content,But I did 
  put </p>
  
  <blockquote>
    <p>consumes =MediaType.APPLICATION_JSON_VALUE</p>
  </blockquote>
  
  <p>inside @RequestMapping annotation</p>
  
  <p>What am I missing?</p>