Lombok的Accessors导致EasyExcel读取失败
相关代码
@Data
public class XXXXStoreDTO {
@ExcelIgnore
private String aaaa;
@ExcelProperty(value = "*门店编码",index = 0)
private String storeNo;
@ExcelProperty("门店名称")
private String storeName;
@ExcelIgnore
private String bbbb;
}
@Override
public List<XXXXStoreDTO > getStore(String filePath) throws IOException {
URL url = new URL(filePath);
InputStream inputStream = new BufferedInputStream(url.openStream());
List<CampaignStoreDTO> allList = new ArrayList<>();
EasyExcel.read(inputStream, XXXXStoreDTO .class, new PageReadListener<XXXXStoreDTO >(dataList -> {
allList.addAll(dataList);
})).sheet().headRowNumber(1).doRead();
return allList;
}
当XXXXStoreDTO类上没有添加@Accessors(chain = true)注解后不能正常读取数据,
没有细究原因,记录下坑
系统推荐
- JetBrains IDE 全破解
- Spring Cloud(一):服务治理技术概览【Finchley 版】
- Spring RetryTemplate
- 线上FullGC频繁的排查
- index方法压力测试记录
- 制作KVM ES镜像文件
- Markdown软件比对
- 前后端常用技术
- Mermaid示例
- MySQL数据迁移到PGSQL
- intro
- K8S常用命令
- 随机毒鸡汤:劝你成熟的人很多,陪你幼稚的人很少。