I'm trying to run sample Spring boot application and I'm facing problem with entities that are marked as @RequiredArgsConstructor on my IDE. I'm using latest intelliJ IDEA (14.1) over java 1.8. There's an error marked on IDE when I tried to initialize the entity with constructor arguments.
E.g. It would be showing "cannot resolve symbol" for following line.
itemRepository.save(new Item("MacBook Pro"));
My entity would be as follows.
@Entity
@Data
@RequiredArgsConstructor
public class Item {
private @Id @GeneratedValue Long id;
private final String description;
Item() {
this.description = null;
}
}
Apart from IDE error project builds and runs properly.