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)注解后不能正常读取数据,
没有细究原因,记录下坑
系统推荐
- MyBatis
- CloudFlare 客户端证书的使用
- JVM参数设置
- Nacos-Spring Gateway-Spring boot无感发布
- Spring RetryTemplate
- 数据同步方案
- 线上FullGC频繁的排查
- Spring Boot升级到2 6 x踩的坑
- MyBatis xml特殊字符处理
- PGSQL的json和 jsonb 读写性能测试
- vuepress-theme-hope 添加谷歌广告
- K8S常用命令
- 随机毒鸡汤:猛的一看你不怎么样,仔细一看,还不如猛的一看。