Browse Source

Merge pull request #1117 from dota17/2.1.x

修改了几个拼写问题
pull/1178/head
Jiaju Zhuang 5 years ago committed by GitHub
parent
commit
2402682d54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/test/java/com/alibaba/easyexcel/test/demo/read/NoModelDataListener.java
  2. 4
      src/test/java/com/alibaba/easyexcel/test/demo/read/ReadTest.java
  3. 4
      src/test/java/com/alibaba/easyexcel/test/demo/write/WriteTest.java

4
src/test/java/com/alibaba/easyexcel/test/demo/read/NoModleDataListener.java → src/test/java/com/alibaba/easyexcel/test/demo/read/NoModelDataListener.java

@ -16,8 +16,8 @@ import com.alibaba.fastjson.JSON;
*
* @author Jiaju Zhuang
*/
public class NoModleDataListener extends AnalysisEventListener<Map<Integer, String>> {
private static final Logger LOGGER = LoggerFactory.getLogger(NoModleDataListener.class);
public class NoModelDataListener extends AnalysisEventListener<Map<Integer, String>> {
private static final Logger LOGGER = LoggerFactory.getLogger(NoModelDataListener.class);
/**
* 每隔5条存储数据库实际使用中可以3000条然后清理list 方便内存回收
*/

4
src/test/java/com/alibaba/easyexcel/test/demo/read/ReadTest.java

@ -249,9 +249,9 @@ public class ReadTest {
* 不创建对象的读
*/
@Test
public void noModleRead() {
public void noModelRead() {
String fileName = TestFileUtil.getPath() + "demo" + File.separator + "demo.xlsx";
// 这里 只要,然后读取第一个sheet 同步读取会自动finish
EasyExcel.read(fileName, new NoModleDataListener()).sheet().doRead();
EasyExcel.read(fileName, new NoModelDataListener()).sheet().doRead();
}
}

4
src/test/java/com/alibaba/easyexcel/test/demo/write/WriteTest.java

@ -456,9 +456,9 @@ public class WriteTest {
* 不创建对象的写
*/
@Test
public void noModleWrite() {
public void noModelWrite() {
// 写法1
String fileName = TestFileUtil.getPath() + "noModleWrite" + System.currentTimeMillis() + ".xlsx";
String fileName = TestFileUtil.getPath() + "noModelWrite" + System.currentTimeMillis() + ".xlsx";
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,名字为模板 然后文件流会自动关闭
EasyExcel.write(fileName).head(head()).sheet("模板").doWrite(dataList());
}

Loading…
Cancel
Save