title: restTemplate.postForObject not sending all the member variables of object
body: <p>I am trying to post the object to another service using restTemplate.postForObject, but one of the member variable value is going as 0. But when I try to use rest clients in the chrome browser to send the same post request, then all values are going. Please help me where I am doing wrong.</p>
  <p><strong>Client code</strong></p>
  <pre><code>// Sender. Sending the seed object to bidServiceEndpoint + &quot;seedbid&quot;.
      private Bid saveSeedBid(Seed seed) {
          Bid bid = new Bid();
          bid.setEmail(seed.getEmail());
          log.info(&quot;seed price = &quot; + seed.getSeed_price());
          bid.setNew_price(seed.getSeed_price());
          bid.setSid(seed.getSid());
          log.info(&quot;seed info &quot; + seed.toString());
          log.info(&quot;Saving seed bid &quot; + bid.toString());
          return restTemplate.postForObject(bidServiceEndpoint + &quot;seedbid&quot;, seed, Bid.class);
  </code></pre>
  <p>This is printing</p>
  <pre><code>2021-04-08 21:08:50.168  INFO 13912 --- [nio-5003-exec-7] murali.bidder.seed.service.SeedService   : Saving seed bid Bid(bid=null, bid_time=null, email=xyz@gmail.com, old_price=0, new_price=500, sid=41ee3f6e-0afd-4d26-b827-12e5687fadc2)
  </code></pre>
  <p>Observe above that I am passing email, new_price and sid. here new_price value is 500.</p>
  <p><strong>Now here is the server code:-</strong></p>
  <pre><code>    @PostMapping(&quot;/seedbid&quot;)
      public Bid saveSeedBid(@RequestBody Bid bid) {
          log.info(&quot;Saving seed bid &quot; + bid.toString());
          return bidService.saveSeedBid(bid);
      }
  </code></pre>
  <p>This is printing</p>
  <pre><code>2021-04-08 21:08:50.189  INFO 13040 --- [nio-5004-exec-1] m.bidder.bid.controller.BidController    : Saving seed bid Bid(bid=null, bid_time=null, email=xyz@gmail.com, old_price=0, new_price=0, sid=41ee3f6e-0afd-4d26-b827-12e5687fadc2)
  </code></pre>
  <p>Here if you observe email and sid are coming properly but new_price is coming as 0.</p>
  <p>Please help why new_price is coming as zero.</p>
  <p>Here is the Bid pojo</p>
  <pre><code>
  import java.util.Date;
  
  import com.fasterxml.jackson.annotation.JsonFormat;
  
  import lombok.AllArgsConstructor;
  import lombok.Data;
  import lombok.NoArgsConstructor;
  
  @Data
  @NoArgsConstructor
  @AllArgsConstructor
  public class Bid {
  
      private String bid;
      
      @JsonFormat(pattern=&quot;yyyy-MM-dd HH:mm:ss.SSS&quot;)
      private Date bid_time;
      
      private String email;
      
      private int old_price;
      
      private int new_price;
      
      private String sid;
  }
  
  </code></pre>