📌  相关文章
📜  解决了@DeleteMapping 上的 [org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'GET' not supported] - 无论代码示例

📅  最后修改于: 2022-03-11 14:55:29.345000             🧑  作者: Mango

代码示例1
@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