easyexcel
easyexcel copied to clipboard
easyExcel读取大文件提示没有ehcache
异常提示:java.lang.NoSuchMethodError: org.ehcache.config.builders.CacheManagerBuilder.persistence(Ljava/io/File;)Lorg/ehcache/config/builders/CacheManagerConfiguration;
读取一个20M,20万条记录的excel,提示上述错误,小文件可以正常读取,请问这个问题该怎么解决?谢谢!
已解决,需要添加ehcache依赖
默认使用的3.2.2版本 没有对用的方法
[INFO] +- com.alibaba:easyexcel:jar:2.2.6:compile
[INFO] | +- cglib:cglib:jar:3.1:compile
[INFO] | | \- org.ow2.asm:asm:jar:4.2:compile
[INFO] | \- org.ehcache:ehcache:jar:3.2.2:compile
需显式添加高版本的ehcache
<dependency>
<groupId>org.ehcache</groupId>
<artifactId>ehcache</artifactId>
<version>3.8.1</version>
</dependency>