title: Configuring lombok for builder
body: <p>I want to avoid multiple constructors, so I want to use a <a href="https://en.wikipedia.org/wiki/Builder_pattern" rel="nofollow noreferrer">builder design pattern</a>, by using <a href="https://projectlombok.org/setup/maven" rel="nofollow noreferrer">lombok</a> library, it can be more easier, so I want to annotate class of <code>ContractDTO</code> with this library annotation:</p>
  
  <pre><code>@Getter
  @Setter
  @NoArgsConstructor
  @AllArgsConstructor
  @Builder(toBuilder = true)
  class ContractDTO {
  
      private Integer id;  
      private String name;
      private Integer acquirerId;    
      private Integer terminalId;    
      private String merchantId;
  
  }
  </code></pre>
  
  <p>then your code can be :</p>
  
  <pre><code>...
  .map(g -&gt; new ContractDTO().toBuilder()
          .name(g.getName())
          .merchantName(g.getMerchantId())
          .build()
  )....
  </code></pre>
  
  <p>But when I try to compile the code I get cannot find symbol
  [ERROR]   symbol:   method toBuilder()</p>
  
  <p>Probably I need to generate the code in advance?</p>