title: How to pass 2 objects in @RequestBody?
body: <p>Could you help me to solve a problem with passing two objects through @RequestBody?
  As far as I know you can't pass 2 @RequestBody parameters, so I've created <code>Tuple</code> class to store custom data. 
  In my case I need to pass a <code>Book</code> object and int value in json representation. I've already tried different ways but each time it cannot be parsed aright. </p>
  
  <pre><code>    @NoArgsConstructor
      @AllArgsConstructor
      @Getter
      @EqualsAndHashCode
      @ToString
      public final class Tuple&lt;K, V&gt; {
          private K key;
          private V value;
      }
  </code></pre>
  
  <p>I use <code>Tuple</code> in this method.</p>
  
  <pre><code>    @PutMapping("action/returnBook")
      public ResponseEntity&lt;Void&gt; returnBook(@RequestBody final Tuple&lt;Long, Long&gt; userIdBookInstanceId) {
          leasingHistoryService.returnBook(userIdBookInstanceId.getKey(), userIdBookInstanceId.getValue());
          return new ResponseEntity&lt;&gt;(HttpStatus.OK);
      }
  
      @Entity
      @NoArgsConstructor
      @AllArgsConstructor
      @Getter
      @EqualsAndHashCode
      @ToString
      public final class Book {
  
          @Id
          @GeneratedValue(strategy = GenerationType.IDENTITY)
          private Long id;
  
          private String title;
  
          @ManyToOne(cascade = CascadeType.ALL, optional = false)
          private Author author;
  
      }
  
      @Entity
      @NoArgsConstructor
      @AllArgsConstructor
      @Getter
      @EqualsAndHashCode
      @ToString
      public final class Author {
  
          @Id
          @GeneratedValue(strategy=GenerationType.IDENTITY)
          private Long id;
  
          private String name;
  
          private LocalDate dateOfBirth;
  
          private String bio;
     }
  </code></pre>
  
  <p>What is the structure of the json that I should pass in the <code>PUT</code> request?</p>