'Spring CrudRepository

I am trying to implement all basic CRUD operations using Spring and CrudRepository. I have already implemented GET, POST, DELETE, PUT but I want also to implement PATCH. Does Crud Repository supports HTTP PATCH? Because so far I haven't find any method of CrudRepository that implements that.



Solution 1:[1]

When you check the HTTP PATCH, PATCH means: Modifies the given record

If you want to implement it, you just need call the Update API of your CrudRepository in your Service/Controller class with the PATCH method.

But in mordern REST API implementation, we seldom use this. Most USE PUT instead.

For the several REST part, you can refer to: confusion between post and get method

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 SeanH