|
|
@ -8,6 +8,7 @@ import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
|
|
|
|
|
|
|
|
import com.alibaba.excel.EasyExcel; |
|
|
|
import com.alibaba.excel.EasyExcel; |
|
|
|
|
|
|
|
import com.alibaba.excel.cache.Ehcache; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 临时测试 |
|
|
|
* 临时测试 |
|
|
@ -25,4 +26,15 @@ public class HeadReadTest { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
|
|
public void testCache() throws Exception { |
|
|
|
|
|
|
|
File file = new File("D:\\test\\headt1.xls"); |
|
|
|
|
|
|
|
EasyExcel.read(file, HeadReadData.class, new HDListener()).readCache(new Ehcache(20)).sheet(0).doRead(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LOGGER.info("------------------"); |
|
|
|
|
|
|
|
EasyExcel.read(file, HeadReadData.class, new HDListener()).readCache(new Ehcache(20)).sheet(0).doRead(); |
|
|
|
|
|
|
|
LOGGER.info("------------------"); |
|
|
|
|
|
|
|
EasyExcel.read(file, HeadReadData.class, new HDListener()).readCache(new Ehcache(20)).sheet(0).doRead(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|