Перейти к содержимому

#67 🌐 Web Service Layer | Part 8 — 🌱 Spring Web | @PatchMapping

3IA Community

0:00 / 0:00

#67 🌐 Web Service Layer | Part 8 — 🌱 Spring Web | @PatchMapping

15 просмотров · 2 недели назад
3IA Community
350 подписчиков
15 просмотров · 2 недели назад
#67 🌐 Web Service Layer | Part 8 — 🌱 Spring Web | @PatchMapping | Partial Update with Spring Boot Description: In this video, we continue our exploration of the Web Service Layer with Spring Web and Spring Boot. After seeing in previous videos how to use `@PostMapping` to create a resource and `@PutMapping` to update an entire resource, we will now discover `@PatchMapping`. We will understand how to use HTTP PATCH to perform a **partial update of a resource**, that is, modify only the necessary information of a product without replacing all of its data. We will also compare `PUT` and `PATCH` to understand in which situations to use each HTTP method in a REST API. This video covers: • Understanding the role of `@PatchMapping` • Understanding how HTTP PATCH works • Understanding the difference between PUT and PATCH requests • Performing a partial product update • Using `@PathVariable` to identify the product • Using `@RequestBody` to receive the data to be modified • Modifying only the fields sent in the request • Checking the fields present in the JSON • Updating a product in the database • Using `save()` to save the changes • Testing an HTTP PATCH request with JSON • Understanding the relationship between PATCH, JSON, `@PathVariable`, `@RequestBody`, and the Controller Video objectives: ✔ Understanding how `@PatchMapping` works ✔ Understanding the role of HTTP PATCH ✔ Understanding the difference between PUT and PATCH requests ✔ Performing a partial update ✔ Using `@PathVariable` ✔ Using `@RequestBody` ✔ Modifying only the necessary fields ✔ Updating a `Product` ✔ Saving changes with `save()` ✔ Testing a PATCH request with JSON ✔ Understanding PATCH in a REST API ✔ Putting `@PatchMapping` into practice with Spring Boot GitHub source code: https://github.com/3ia-community/Form... Contact me: 📧 [mohammedezzaim00@gmail.com](mailto:mohammedezzaim00@gmail.com) 💼   / mohammed-ezzaim   🐱 https://github.com/mohammed-ezzaim Keywords & Hashtags: #SpringWeb #SpringWebMVC #SpringBoot #PatchMapping #RequestBody #PathVariable #PutMapping #PATCH #PUT #RESTAPI #REST #Java #BackendDevelopment #JavaDeveloper #SpringBootTutorial #API #HTTP #HTTPPATCH #WebService #JSON #MySQL #JPA #CRUD #Update #PartialUpdate #3IACommunity