title: PUT request wont go through unless I provide ID in body
body: <p>I am using path variable in url in order to update my object. How can I modify my code for it to work without needing to provide an id in the post body if I already got it in the url?</p>
  <pre class="lang-java prettyprint-override"><code>    public class Person {
          
          private String name;
          private UUID id;
          
          public(UUID id, String name) {
              this.id = id;
              this.name = name;
          }
          ...getters
      } 
  </code></pre>
  <p>Service class</p>
  <pre><code>public int updatePerson(UUID id, Person person) {
          String sql = &quot;UPDATE person SET name = ? WHERE id = ?&quot;;
          return jdbcTemplate.update(sql, person.getName(), person.getId());
      }
  </code></pre>
  <p>Controller</p>
  <pre class="lang-java prettyprint-override"><code> @PutMapping(&quot;/{id}&quot;)
      public int updatePerson(@PathVariable UUID id, @RequestBody Person person) {
          return personService.updatePerson(id, person);
      }
  </code></pre>