Resolved [org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'GET' not supported] [2 code example
Example: Resolved [org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'GET' not supported] on @DeleteMapping
@RequestMapping(value="/empdelete/{id}", method=RequestMethod.DELETE)
public void deleteEmployee( PathVariable(“id”) Long id) {
collaborateurRepository.deleteById(id);
}
//method={RequestMethod.DELETE, RequestMethod.GET}
=> changing for this GET method works fine