POI tool, excel quick import and export, excel template export, word template export, can complete the import and export of Excel in only 5 lines of code, the modification and export format is simple, rough, fast and effective, easypoi is worth your try
正常我们通过校验字段时,会加上name,这就会导致返回的errorMsg上出现重复字段名的问题 如字段注解如下
@Excel(name = "姓名") @ApiModelProperty(value = "姓名") @NotBlank(message = "姓名不能为空") @Length(max = 30, message = "姓名请少于{max}字") private String username;
实际错误信息会返回
第2条记录,数据校验不通过,原因:姓名姓名不能为空