HTTP ERROR 405 code example
Example 1: http 405
405 Method Not Allowed
Example 2: Request method 'GET' not supported 405
@RestController
@RequestMapping(value="/api")
public class RequestMethodController {
@Autowired
private EmployeeService service;
@RequestMapping(value = "/employees", produces = "application/json")
public List<Employee> findEmployees()
throws InvalidRequestException {
return service.getEmployeeList();
}
}
Example 3: "status": 405, "error": "Method Not Allowed",
the possibility is that you have use wong request type:GET instead of POST or something else