It seems that @RequiredArgsConstructor not working in the code below. Why is it?
@RequiredArgsConstructor
import java.io.Serializable; import lombok.Data; import lombok
The argument fields for @RequiredArgsConstructor annotation has to be final. So this fix will work:
final
private final String username;
The IDE IntelliJ makes the variable grey (inactive status) when final keyword missed, which is very helpful to detect this kind of mistake.