:lombok/Data report an error
Today I pulled a git code and reported an error after starting:
: lombok/Data
After inspection, it was found
It is caused by using Data on the attribute and referring to the package.
You can see that there are several Data in this class. This is very serious here. The reason for this problem is that Date is written as Data. So there will be an error lombok/Data problem.
To check globally such that the attribute is written as Data, then reference the package, this place.
package ; import ; import ; import ; import ; /** * @Description: User Portrait-Template List Request Parameter Class * @Version: V1.0 */ @ApiModel @Data public class RcPortraitTemplateQO extends PageQO{ @ApiModelProperty(name = "id", value = "Primary Key", example = "1") private Long id; /** * Template name **/ @ApiModelProperty(name = "templateName",value = "Template Name",example = "xxx template") private String templateName; /** * Template content **/ @ApiModelProperty(name = "templateContent",value = "Template Content",example = "xxxjson string") private String templateContent; /** * Remark **/ @ApiModelProperty(name = "remark",value = "Remark",example = "Applicable to that project") private String remark; /** * Creation time **/ @ApiModelProperty(name = "createTime",value = "Create time",example = "2024-02-23 00:00:00") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Data createTime; /** * Modification time **/ @ApiModelProperty(name = "updateTime",value = "Modify time",example = "2024-02-23 00:00:00") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Data updateTime; /** * Operator **/ @ApiModelProperty(name = "operator",value = "Operator",example = "Luo Yan-1211535") private String operator; }
Error code
You can see that the lombok package is referenced here. The attribute type of the class also uses Data, and the one that should be used is Date
package ; import ; import ; import ; import ; /** * Creation time **/ @ApiModelProperty(name = "createTime",value = "Create time",example = "2024-02-23 00:00:00") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Data createTime; /** * Modification time **/ @ApiModelProperty(name = "updateTime",value = "Modify time",example = "2024-02-23 00:00:00") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Data updateTime;
Correct code
After modification
package ; import ; import ; import ; import ; import ; /** * Creation time **/ @ApiModelProperty(name = "createTime",value = "Create time",example = "2024-02-23 00:00:00") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date createTime; /** * Modification time **/ @ApiModelProperty(name = "updateTime",value = "Modify time",example = "2024-02-23 00:00:00") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date updateTime;
Summarize
The above is personal experience. I hope you can give you a reference and I hope you can support me more.