full-stack-professional
full-stack-professional copied to clipboard
JdbcTemplate, updateCustomer and updateCustomerById
Both methods shown in the first part of the course are verbose and consist of the unnecessary logic.
Whenever we work with an API, we have a documentation in which one can find endpoints and how payload should look like
In case of a PUT request there is no need in updating one of the fields since PUT would modifies the whole resource anyway.
What you do relates more to PATCH request. Whenever you just want to modify a part of the resource. Let's say, the name { "name": "john doe" }