It seems that @RequiredArgsConstructor not working in the code below. Why is it?
@RequiredArgsConstructor
import java.io.Serializable; import lombok.Data; import lombok
According to Documentation, Required arguments are final fields and fields with constraints such as @NonNull.
You need to make username as @NonNull
@NonNull private String username;
And you need to make them final too.