I'm working on a simple Spring Boot project where I have used sping web and lombok dependency. In the model class I have used lombok annotation instead of creating constractor, getter and setter manually. But unfortunaty I am encountering an issue with the following error:
D:\Downloads\springwiththymefeaf\springwiththymefeaf\src\main\java\com\petproject\springwiththymefeaf\controller\TaskController.java:13:21
java: constructor Task in class com.petproject.springwiththymefeaf.model.Task cannot be applied to given types;
required: no arguments
found: int,java.lang.String,boolean
reason: actual and formal argument lists differ in length
here is the Task model:
package com.petproject.springwiththymefeaf.model;
import lombok.*;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Task {
private int id;
private String title;
private boolean completed;
}
I'm using IntelliJ IDEA and have taken the following steps to resolve it:
- Checked and reinstalled the Lombok plugin.
- Enabled annotation processing in the settings.
- Updated to the latest version of Lombok.
Despite these efforts, the error persists.
Interestingly, the same project runs without issues in Visual Studio Code.
What can I do to resolve this problem in IntelliJ IDEA?