@PatchMapping
Learn @PatchMapping (Controllers, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Fresher Notes @PatchMapping maps HTTP PATCH requests; it is the shortcut for @RequestMapping(method = RequestMethod.PATCH) and applies a partial update to a resource. Only changed fields are sent, for example {"email":"new@x.com"} ; all other fields stay as they are. Typical use : change one field such as a status, a password or a profile detail without sending the whole object.
More lessons in Controllers
- @Controller
- @RestController
- Controller Lifecycle
- Controller Methods
- Request Mapping
- @RequestMapping
- @GetMapping
- @PostMapping
- @PutMapping
- @DeleteMapping
- Mapping HTTP Methods
- Mapping URL Paths
- Class-Level Mapping
- Method-Level Mapping
- Multiple URL Mappings
- Consumes
- Produces
- Mini Project: Controller Types and Mapping Rules