Skip to main content

@PutMapping

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

Fresher Notes @PutMapping maps HTTP PUT requests; it is the shortcut for @RequestMapping(method = RequestMethod.PUT) and is used to replace a whole resource. Full replacement : the client sends the complete new state of the resource at a known URL such as /users/5 . Response : 200 OK with the body, or 204 No Content; 404 when the id does not exist.

More lessons in Controllers