title: SpringBoot ignoring my @RequestBody param?
body: <p>I have the following Controller:</p>
  <pre class="lang-java prettyprint-override"><code>@Validated
  @RestController
  public class ProductController {
    @Autowired
    private ProductService productService;
  
    @PutMapping(&quot;/products/{productId}/costs&quot;)
    public ResponseEntity&lt;Product&gt; updateProductCost(@RequestHeader String authorization, @PathVariable UUID productId, @RequestBody ProductCost productCost) {
      Product updatedProduct = productService.updateProductCost(productId, productCost);
  
      return ResponseEntity.ok(updatedProduct);
    }
  }
  </code></pre>
  <p>The ProductCost model looks like:</p>
  <pre class="lang-java prettyprint-override"><code>@Data
  @NoArgsConstructor
  @Entity
  @Table(name = &quot;product_costs&quot;, schema = &quot;mws&quot;)
  public class ProductCost implements Serializable {
    private static final long serialVersionUID = 1789128204447938816L;
  
    @Column
    private Double unitCost;
  
    @Column
    private Double shippingCost;
  
    @Column
    private Double pickPack;
  
    @Column
    private Double weightHandling;
  
    @Column
    private Double handling;
  
    @Column
    private Double fbaFee;
  
    @Column
    private Double referFee;
  
    @Column
    private String currencyCode;
  
    @CreationTimestamp
    private Date createdAt;
  
    @UpdateTimestamp
    private Date updatedAt;
  
    @Id
    @OneToOne
    @JoinColumn(name = &quot;product_id&quot;)
    @JsonBackReference
    private Product product;
  </code></pre>
  <p>My problem is that when calling that endpoint, the productCost variable comes with all fields set to null, even though I'm seding it real data.</p>
  <p>The request body looks like:</p>
  <pre><code>{
     productCost: {
       createdAt: &quot;2020-08-22T21:22:33.989+0000&quot;
       currencyCode: &quot;USD&quot;
       fbaFee: 0
       andling: 0
       pickPack: 0
       referFee: 0
       shippingCost: 0
       unitCost: 5
       updatedAt: &quot;2020-08-22T21:22:33.989+0000&quot;
       weightHandling: 0
     }
  }
  </code></pre>
  <p>Am I missing something obvious?  Why is the Product Cost not mapped correctly from my request's <code>body</code> to the <code>productCost</code> variable in the controller?</p>