title: Request method 'DELETE' not supported
body: <p>I started learning Spring boot and am trying to make a simple REST service for implementing CRUD operations on employee records. But I am getting this error while executing the DELETE method-</p>
  
  <blockquote>
    <p>{
       "timestamp": "2018-08-10T11:17:47.619+0000",
       "status": 405,
        "error": "Method Not Allowed",
        "message": "Request method 'DELETE' not supported",
        "path": "/employees/123"
    }</p>
  </blockquote>
  
  <p>My Controller-</p>
  
  <pre><code>@DeleteMapping("/employee/{id}")
  public String deleteEmployee(@PathVariable int id) {
      return employeeService.deleteEmployee(id);
  
  }
  </code></pre>
  
  <p>My Service-</p>
  
  <pre><code>public String deleteEmployee(int id) {
      // TODO Auto-generated method stub
      for(int i=0;i&lt;list.size();i++) {
          if(list.get(i).getId()==id) {
              list.remove(i);
          }
      }
      return "Employee withh id "+id+" has been removed from the company";
  }
  </code></pre>