Skip to main content

@DeleteMapping

Learn @DeleteMapping (Controllers, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Fresher Notes @DeleteMapping maps HTTP DELETE requests; it is the shortcut for @RequestMapping(method = RequestMethod.DELETE) and removes a resource identified by the URL. Typical shape : DELETE /users/5 with the id as a @PathVariable and no request body. Response : 204 No Content on success, or 404 if the resource does not exist.

More lessons in Controllers