@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
- @Controller
- @RestController
- Controller Lifecycle
- Controller Methods
- Request Mapping
- @RequestMapping
- @GetMapping
- @PostMapping
- @PutMapping
- @PatchMapping
- Mapping HTTP Methods
- Mapping URL Paths
- Class-Level Mapping
- Method-Level Mapping
- Multiple URL Mappings
- Consumes
- Produces
- Mini Project: Controller Types and Mapping Rules