title: Spring MVC and the @Data annotation
body: <ul>
  <li><p>I am using <code>SpringToolSuite</code> as IDE and developing using <code>Spring MVC</code>.</p>
  </li>
  <li><p>In the model part of my application I am defining a bean called <em>Ingredient</em></p>
  </li>
  </ul>
  <pre class="lang-java prettyprint-override"><code>import lombok.Data;
  
  @Data
  public class Ingredient {
      
      public Ingredient(String string, String string2, Type wrap) {
          // TODO Auto-generated constructor stub
      }
      private String id;
      private String name;
      private Type type;
      public enum Type{
          WRAP, PROTEIN, VEGGIES, CHEESE, SAUCE
      }
  
  }
  </code></pre>
  <ul>
  <li><p>As I am using the <em><code>@Data</code></em> annotation from <strong>Lombok</strong> I can suppose that a constructor taking the 3 attributes is automatically created as well as getter and setters.</p>
  </li>
  <li><p>But as in the controller I call  <em><code>new Ingredient(&quot;FLTO&quot;, &quot;Flour Tortilla&quot;, Type.WRAP)</code></em> I get a redline under the instruction with a message that tells me that there is no constructor with the parameters in question.</p>
  <ul>
  <li>I don't understand because the class Ingredient is marked with the Lombok's annotation <em><code>@Data</code></em></li>
  </ul>
  </li>
  <li><p>The errors cause the running of the SpringBoot's project to crash</p>
  </li>
  </ul>
  <pre class="lang-sh prettyprint-override"><code>Caused by: java.lang.Error: Unresolved compilation problems: 
      The method asList(T...) in the type Arrays is not applicable for the arguments (Ingredient, Ingredient, Ingredient, Ingredient, Ingredient, Ingredient, Ingredient, Ingredient, Ingredient, Ingredient)
      The constructor Ingredient(String, String, Ingredient.Type) is undefined
  .........................
  </code></pre>