mirror of https://github.com/alibaba/easyexcel
zhuangjiaju
5 years ago
33 changed files with 648 additions and 44 deletions
@ -0,0 +1,42 @@
|
||||
package com.alibaba.easyexcel.test.core.compatibility; |
||||
|
||||
import java.text.ParseException; |
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
import org.junit.Assert; |
||||
import org.slf4j.Logger; |
||||
import org.slf4j.LoggerFactory; |
||||
|
||||
import com.alibaba.easyexcel.test.core.annotation.AnnotationData; |
||||
import com.alibaba.excel.context.AnalysisContext; |
||||
import com.alibaba.excel.event.AnalysisEventListener; |
||||
import com.alibaba.excel.exception.ExcelCommonException; |
||||
import com.alibaba.excel.util.DateUtils; |
||||
import com.alibaba.fastjson.JSON; |
||||
|
||||
/** |
||||
* @author zhuangjiaju |
||||
*/ |
||||
public class AnnotationDataListener extends AnalysisEventListener<AnnotationData> { |
||||
private static final Logger LOGGER = LoggerFactory.getLogger(AnnotationDataListener.class); |
||||
List<AnnotationData> list = new ArrayList<AnnotationData>(); |
||||
|
||||
@Override |
||||
public void invoke(AnnotationData data, AnalysisContext context) { |
||||
list.add(data); |
||||
} |
||||
|
||||
@Override |
||||
public void doAfterAllAnalysed(AnalysisContext context) { |
||||
Assert.assertEquals(list.size(), 1); |
||||
AnnotationData data = list.get(0); |
||||
try { |
||||
Assert.assertEquals(data.getDate(), DateUtils.parseDate("2020-01-01 01:01:01")); |
||||
} catch (ParseException e) { |
||||
throw new ExcelCommonException("Test Exception", e); |
||||
} |
||||
Assert.assertEquals(data.getNumber(), 99.99, 0.00); |
||||
LOGGER.debug("First row:{}", JSON.toJSONString(list.get(0))); |
||||
} |
||||
} |
@ -0,0 +1,17 @@
|
||||
package com.alibaba.easyexcel.test.core.compatibility; |
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty; |
||||
import com.alibaba.excel.metadata.BaseRowModel; |
||||
|
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* @author zhuangjiaju |
||||
*/ |
||||
@Data |
||||
public class CompatibilityData extends BaseRowModel { |
||||
@ExcelProperty("字符串标题0") |
||||
private String string0; |
||||
@ExcelProperty("字符串标题1") |
||||
private String string1; |
||||
} |
@ -0,0 +1,133 @@
|
||||
package com.alibaba.easyexcel.test.core.compatibility; |
||||
|
||||
import java.io.File; |
||||
import java.io.FileOutputStream; |
||||
import java.io.OutputStream; |
||||
import java.util.ArrayList; |
||||
import java.util.HashMap; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
import org.apache.poi.ss.usermodel.IndexedColors; |
||||
import org.junit.BeforeClass; |
||||
import org.junit.Test; |
||||
|
||||
import com.alibaba.easyexcel.test.util.TestFileUtil; |
||||
import com.alibaba.excel.EasyExcelFactory; |
||||
import com.alibaba.excel.ExcelWriter; |
||||
import com.alibaba.excel.metadata.Font; |
||||
import com.alibaba.excel.metadata.Sheet; |
||||
import com.alibaba.excel.metadata.Table; |
||||
import com.alibaba.excel.metadata.TableStyle; |
||||
|
||||
/** |
||||
* |
||||
* @author zhuangjiaju |
||||
*/ |
||||
public class CompatibilityDataTest { |
||||
|
||||
private static File file07; |
||||
private static File file03; |
||||
|
||||
@BeforeClass |
||||
public static void init() { |
||||
file07 = TestFileUtil.createNewFile("compatibility07.xlsx"); |
||||
file03 = TestFileUtil.createNewFile("compatibility03.xls"); |
||||
} |
||||
|
||||
@Test |
||||
public void T01ReadAndWrite07() throws Exception { |
||||
readAndWrite(file07); |
||||
} |
||||
|
||||
@Test |
||||
public void T02ReadAndWrite03() throws Exception { |
||||
readAndWrite(file03); |
||||
} |
||||
|
||||
private void readAndWrite(File file) throws Exception { |
||||
OutputStream out = new FileOutputStream(file); |
||||
ExcelWriter writer = EasyExcelFactory.getWriter(out); |
||||
// sheet1 width,string head,stirng data
|
||||
Sheet sheet1 = new Sheet(1, 3); |
||||
sheet1.setSheetName("第一个sheet"); |
||||
Map columnWidth = new HashMap(); |
||||
columnWidth.put(0, 10000); |
||||
columnWidth.put(1, 50000); |
||||
sheet1.setColumnWidthMap(columnWidth); |
||||
sheet1.setHead(head()); |
||||
writer.write1(listData(), sheet1); |
||||
|
||||
// sheet2 style,class head
|
||||
Sheet sheet2 = new Sheet(2, 3, CompatibilityData.class, "第二个sheet", null); |
||||
sheet2.setTableStyle(style()); |
||||
writer.write(data(), sheet2); |
||||
|
||||
// sheet3 table
|
||||
Sheet sheet3 = new Sheet(3, 0); |
||||
sheet3.setSheetName("第三个sheet"); |
||||
|
||||
Table table1 = new Table(1); |
||||
table1.setHead(head()); |
||||
writer.write1(listData(), sheet3, table1); |
||||
|
||||
Table table2 = new Table(2); |
||||
table2.setClazz(CompatibilityData.class); |
||||
writer.write(data(), sheet3, table2); |
||||
|
||||
writer.finish(); |
||||
out.close(); |
||||
|
||||
// EasyExcelFactory.write(file, AnnotationData.class).sheet().doWrite(data()).finish();
|
||||
// EasyExcelFactory.read(file, AnnotationData.class, new AnnotationDataListener()).sheet().doRead().finish();
|
||||
} |
||||
|
||||
private List<List<String>> head() { |
||||
List<List<String>> list = new ArrayList<List<String>>(); |
||||
List<String> head0 = new ArrayList<String>(); |
||||
head0.add("字符串标题0"); |
||||
List<String> head1 = new ArrayList<String>(); |
||||
head1.add("字符串标题1"); |
||||
list.add(head0); |
||||
list.add(head1); |
||||
return list; |
||||
} |
||||
|
||||
private List<List<Object>> listData() { |
||||
List<List<Object>> list = new ArrayList<List<Object>>(); |
||||
List<Object> data0 = new ArrayList<Object>(); |
||||
data0.add("字符串0"); |
||||
data0.add(1); |
||||
list.add(data0); |
||||
return list; |
||||
} |
||||
|
||||
private List<CompatibilityData> data() { |
||||
List<CompatibilityData> list = new ArrayList<CompatibilityData>(); |
||||
for (int i = 0; i < 10; i++) { |
||||
CompatibilityData data = new CompatibilityData(); |
||||
data.setString0("字符串0" + i); |
||||
data.setString1("字符串1" + i); |
||||
list.add(data); |
||||
} |
||||
return list; |
||||
} |
||||
|
||||
public TableStyle style() { |
||||
TableStyle tableStyle = new TableStyle(); |
||||
Font headFont = new Font(); |
||||
headFont.setBold(true); |
||||
headFont.setFontHeightInPoints((short)22); |
||||
headFont.setFontName("楷体"); |
||||
tableStyle.setTableHeadFont(headFont); |
||||
tableStyle.setTableHeadBackGroundColor(IndexedColors.BLUE); |
||||
|
||||
Font contentFont = new Font(); |
||||
contentFont.setBold(true); |
||||
contentFont.setFontHeightInPoints((short)22); |
||||
contentFont.setFontName("黑体"); |
||||
tableStyle.setTableContentFont(contentFont); |
||||
tableStyle.setTableContentBackGroundColor(IndexedColors.GREEN); |
||||
return tableStyle; |
||||
} |
||||
} |
@ -0,0 +1,14 @@
|
||||
package com.alibaba.easyexcel.test.core.repetition; |
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty; |
||||
|
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* @author zhuangjiaju |
||||
*/ |
||||
@Data |
||||
public class RepetitionData { |
||||
@ExcelProperty("字符串") |
||||
private String string; |
||||
} |
@ -0,0 +1,34 @@
|
||||
package com.alibaba.easyexcel.test.core.repetition; |
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
import org.junit.Assert; |
||||
import org.slf4j.Logger; |
||||
import org.slf4j.LoggerFactory; |
||||
|
||||
import com.alibaba.easyexcel.test.core.simple.SimpleDataListener; |
||||
import com.alibaba.excel.context.AnalysisContext; |
||||
import com.alibaba.excel.event.AnalysisEventListener; |
||||
import com.alibaba.fastjson.JSON; |
||||
|
||||
/** |
||||
* @author zhuangjiaju |
||||
*/ |
||||
public class RepetitionDataListener extends AnalysisEventListener<RepetitionData> { |
||||
private static final Logger LOGGER = LoggerFactory.getLogger(SimpleDataListener.class); |
||||
List<RepetitionData> list = new ArrayList<RepetitionData>(); |
||||
|
||||
@Override |
||||
public void invoke(RepetitionData data, AnalysisContext context) { |
||||
list.add(data); |
||||
} |
||||
|
||||
@Override |
||||
public void doAfterAllAnalysed(AnalysisContext context) { |
||||
Assert.assertEquals(list.size(), 2); |
||||
Assert.assertEquals(list.get(0).getString(), "字符串0"); |
||||
Assert.assertEquals(list.get(1).getString(), "字符串0"); |
||||
LOGGER.debug("First row:{}", JSON.toJSONString(list.get(0))); |
||||
} |
||||
} |
@ -0,0 +1,88 @@
|
||||
package com.alibaba.easyexcel.test.core.repetition; |
||||
|
||||
import java.io.File; |
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
import org.junit.BeforeClass; |
||||
import org.junit.FixMethodOrder; |
||||
import org.junit.Test; |
||||
import org.junit.runners.MethodSorters; |
||||
|
||||
import com.alibaba.easyexcel.test.util.TestFileUtil; |
||||
import com.alibaba.excel.EasyExcelFactory; |
||||
import com.alibaba.excel.ExcelReader; |
||||
import com.alibaba.excel.ExcelWriter; |
||||
import com.alibaba.excel.read.metadata.ReadSheet; |
||||
import com.alibaba.excel.write.metadata.WriteSheet; |
||||
import com.alibaba.excel.write.metadata.WriteTable; |
||||
|
||||
/** |
||||
* |
||||
* @author zhuangjiaju |
||||
*/ |
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING) |
||||
public class RepetitionDataTest { |
||||
|
||||
private static File file07; |
||||
private static File file03; |
||||
private static File fileTable07; |
||||
private static File fileTable03; |
||||
|
||||
@BeforeClass |
||||
public static void init() { |
||||
file07 = TestFileUtil.createNewFile("repetition07.xlsx"); |
||||
file03 = TestFileUtil.createNewFile("repetition03.xls"); |
||||
fileTable07 = TestFileUtil.createNewFile("repetitionTable07.xlsx"); |
||||
fileTable03 = TestFileUtil.createNewFile("repetitionTable03.xls"); |
||||
} |
||||
|
||||
@Test |
||||
public void T01ReadAndWrite07() { |
||||
readAndWrite(file07); |
||||
} |
||||
|
||||
@Test |
||||
public void T02ReadAndWrite03() { |
||||
readAndWrite(file03); |
||||
} |
||||
|
||||
private void readAndWrite(File file) { |
||||
ExcelWriter excelWriter = EasyExcelFactory.write(file, RepetitionData.class).build(); |
||||
WriteSheet writeSheet = EasyExcelFactory.writerSheet(0).build(); |
||||
excelWriter.write(data(), writeSheet).write(data(), writeSheet).finish(); |
||||
ExcelReader excelReader = |
||||
EasyExcelFactory.read(file, RepetitionData.class, new RepetitionDataListener()).build(); |
||||
ReadSheet readSheet = EasyExcelFactory.readSheet(0).build(); |
||||
excelReader.read(readSheet).finish(); |
||||
} |
||||
|
||||
@Test |
||||
public void T03ReadAndWriteTable07() { |
||||
readAndWriteTable(fileTable07); |
||||
} |
||||
|
||||
@Test |
||||
public void T04ReadAndWriteTable03() { |
||||
readAndWriteTable(fileTable03); |
||||
} |
||||
|
||||
private void readAndWriteTable(File file) { |
||||
ExcelWriter excelWriter = EasyExcelFactory.write(file, RepetitionData.class).build(); |
||||
WriteSheet writeSheet = EasyExcelFactory.writerSheet(0).build(); |
||||
WriteTable writeTable = EasyExcelFactory.writerTable(0).build(); |
||||
excelWriter.write(data(), writeSheet, writeTable).write(data(), writeSheet, writeTable).finish(); |
||||
ExcelReader excelReader = |
||||
EasyExcelFactory.read(file, RepetitionData.class, new RepetitionDataListener()).build(); |
||||
ReadSheet readSheet = EasyExcelFactory.readSheet(0).headRowNumber(2).build(); |
||||
excelReader.read(readSheet).finish(); |
||||
} |
||||
|
||||
private List<RepetitionData> data() { |
||||
List<RepetitionData> list = new ArrayList<RepetitionData>(); |
||||
RepetitionData data = new RepetitionData(); |
||||
data.setString("字符串0"); |
||||
list.add(data); |
||||
return list; |
||||
} |
||||
} |
@ -0,0 +1,16 @@
|
||||
package com.alibaba.easyexcel.test.core.style; |
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty; |
||||
|
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* @author zhuangjiaju |
||||
*/ |
||||
@Data |
||||
public class StyleData { |
||||
@ExcelProperty("字符串") |
||||
private String string; |
||||
@ExcelProperty("字符串1") |
||||
private String string1; |
||||
} |
@ -0,0 +1,34 @@
|
||||
package com.alibaba.easyexcel.test.core.style; |
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
import org.junit.Assert; |
||||
import org.slf4j.Logger; |
||||
import org.slf4j.LoggerFactory; |
||||
|
||||
import com.alibaba.easyexcel.test.core.simple.SimpleDataListener; |
||||
import com.alibaba.excel.context.AnalysisContext; |
||||
import com.alibaba.excel.event.AnalysisEventListener; |
||||
import com.alibaba.fastjson.JSON; |
||||
|
||||
/** |
||||
* @author zhuangjiaju |
||||
*/ |
||||
public class StyleDataListener extends AnalysisEventListener<StyleData> { |
||||
private static final Logger LOGGER = LoggerFactory.getLogger(SimpleDataListener.class); |
||||
List<StyleData> list = new ArrayList<StyleData>(); |
||||
|
||||
@Override |
||||
public void invoke(StyleData data, AnalysisContext context) { |
||||
list.add(data); |
||||
} |
||||
|
||||
@Override |
||||
public void doAfterAllAnalysed(AnalysisContext context) { |
||||
Assert.assertEquals(list.size(), 2); |
||||
Assert.assertEquals(list.get(0).getString(), "字符串0"); |
||||
Assert.assertEquals(list.get(1).getString(), "字符串1"); |
||||
LOGGER.debug("First row:{}", JSON.toJSONString(list.get(0))); |
||||
} |
||||
} |
@ -0,0 +1,84 @@
|
||||
package com.alibaba.easyexcel.test.core.style; |
||||
|
||||
import java.io.File; |
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
import org.apache.poi.ss.usermodel.FillPatternType; |
||||
import org.apache.poi.ss.usermodel.IndexedColors; |
||||
import org.junit.BeforeClass; |
||||
import org.junit.FixMethodOrder; |
||||
import org.junit.Test; |
||||
import org.junit.runners.MethodSorters; |
||||
|
||||
import com.alibaba.easyexcel.test.util.TestFileUtil; |
||||
import com.alibaba.excel.EasyExcelFactory; |
||||
import com.alibaba.excel.write.metadata.style.WriteCellStyle; |
||||
import com.alibaba.excel.write.metadata.style.WriteFont; |
||||
import com.alibaba.excel.write.style.HorizontalCellStyleStrategy; |
||||
import com.alibaba.excel.write.style.column.SimpleColumnWidthStyleStrategy; |
||||
import com.alibaba.excel.write.style.row.SimpleRowHeightStyleStrategy; |
||||
|
||||
/** |
||||
* |
||||
* @author zhuangjiaju |
||||
*/ |
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING) |
||||
public class StyleDataTest { |
||||
|
||||
private static File file07; |
||||
private static File file03; |
||||
|
||||
@BeforeClass |
||||
public static void init() { |
||||
file07 = TestFileUtil.createNewFile("style07.xlsx"); |
||||
file03 = TestFileUtil.createNewFile("style03.xls"); |
||||
} |
||||
|
||||
@Test |
||||
public void T01ReadAndWrite07() { |
||||
readAndWrite(file07); |
||||
} |
||||
|
||||
@Test |
||||
public void T02ReadAndWrite03() { |
||||
readAndWrite(file03); |
||||
} |
||||
|
||||
private void readAndWrite(File file) { |
||||
SimpleColumnWidthStyleStrategy simpleColumnWidthStyleStrategy = new SimpleColumnWidthStyleStrategy(50); |
||||
SimpleRowHeightStyleStrategy simpleRowHeightStyleStrategy = |
||||
new SimpleRowHeightStyleStrategy((short)40, (short)50); |
||||
|
||||
WriteCellStyle headWriteCellStyle = new WriteCellStyle(); |
||||
headWriteCellStyle.setFillForegroundColor(IndexedColors.RED.getIndex()); |
||||
WriteFont headWriteFont = new WriteFont(); |
||||
headWriteFont.setFontHeightInPoints((short)20); |
||||
headWriteCellStyle.setWriteFont(headWriteFont); |
||||
WriteCellStyle contentWriteCellStyle = new WriteCellStyle(); |
||||
contentWriteCellStyle.setFillPatternType(FillPatternType.SOLID_FOREGROUND); |
||||
contentWriteCellStyle.setFillForegroundColor(IndexedColors.GREEN.getIndex()); |
||||
WriteFont contentWriteFont = new WriteFont(); |
||||
contentWriteFont.setFontHeightInPoints((short)20); |
||||
headWriteCellStyle.setWriteFont(contentWriteFont); |
||||
HorizontalCellStyleStrategy horizontalCellStyleStrategy = |
||||
new HorizontalCellStyleStrategy(headWriteCellStyle, contentWriteCellStyle); |
||||
EasyExcelFactory.write(file, StyleData.class).registerWriteHandler(simpleColumnWidthStyleStrategy) |
||||
.registerWriteHandler(simpleRowHeightStyleStrategy).registerWriteHandler(horizontalCellStyleStrategy) |
||||
.sheet().doWrite(data()).finish(); |
||||
EasyExcelFactory.read(file, StyleData.class, new StyleDataListener()).sheet().doRead().finish(); |
||||
} |
||||
|
||||
private List<StyleData> data() { |
||||
List<StyleData> list = new ArrayList<StyleData>(); |
||||
StyleData data = new StyleData(); |
||||
data.setString("字符串0"); |
||||
data.setString1("字符串01"); |
||||
StyleData data1 = new StyleData(); |
||||
data1.setString("字符串1"); |
||||
data1.setString1("字符串11"); |
||||
list.add(data); |
||||
list.add(data1); |
||||
return list; |
||||
} |
||||
} |
@ -0,0 +1,16 @@
|
||||
package com.alibaba.easyexcel.test.core.template; |
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty; |
||||
|
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* @author zhuangjiaju |
||||
*/ |
||||
@Data |
||||
public class TemplateData { |
||||
@ExcelProperty("字符串0") |
||||
private String string0; |
||||
@ExcelProperty("字符串1") |
||||
private String string1; |
||||
} |
@ -0,0 +1,34 @@
|
||||
package com.alibaba.easyexcel.test.core.template; |
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
import org.junit.Assert; |
||||
import org.slf4j.Logger; |
||||
import org.slf4j.LoggerFactory; |
||||
|
||||
import com.alibaba.easyexcel.test.core.simple.SimpleDataListener; |
||||
import com.alibaba.excel.context.AnalysisContext; |
||||
import com.alibaba.excel.event.AnalysisEventListener; |
||||
import com.alibaba.fastjson.JSON; |
||||
|
||||
/** |
||||
* @author zhuangjiaju |
||||
*/ |
||||
public class TemplateDataListener extends AnalysisEventListener<TemplateData> { |
||||
private static final Logger LOGGER = LoggerFactory.getLogger(SimpleDataListener.class); |
||||
List<TemplateData> list = new ArrayList<TemplateData>(); |
||||
|
||||
@Override |
||||
public void invoke(TemplateData data, AnalysisContext context) { |
||||
list.add(data); |
||||
} |
||||
|
||||
@Override |
||||
public void doAfterAllAnalysed(AnalysisContext context) { |
||||
Assert.assertEquals(list.size(), 2); |
||||
Assert.assertEquals(list.get(0).getString0(), "字符串0"); |
||||
Assert.assertEquals(list.get(1).getString0(), "字符串1"); |
||||
LOGGER.debug("First row:{}", JSON.toJSONString(list.get(0))); |
||||
} |
||||
} |
@ -0,0 +1,69 @@
|
||||
package com.alibaba.easyexcel.test.core.template; |
||||
|
||||
import java.io.File; |
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
import org.junit.BeforeClass; |
||||
import org.junit.FixMethodOrder; |
||||
import org.junit.Test; |
||||
import org.junit.runners.MethodSorters; |
||||
|
||||
import com.alibaba.easyexcel.test.util.TestFileUtil; |
||||
import com.alibaba.excel.EasyExcelFactory; |
||||
|
||||
/** |
||||
* |
||||
* @author zhuangjiaju |
||||
*/ |
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING) |
||||
public class TemplateDataTest { |
||||
|
||||
private static File file07; |
||||
private static File file03; |
||||
|
||||
@BeforeClass |
||||
public static void init() { |
||||
file07 = TestFileUtil.createNewFile("template07.xlsx"); |
||||
file03 = TestFileUtil.createNewFile("template03.xls"); |
||||
} |
||||
|
||||
@Test |
||||
public void T01ReadAndWrite07() { |
||||
readAndWrite07(file07); |
||||
} |
||||
|
||||
@Test |
||||
public void T02ReadAndWrite03() { |
||||
readAndWrite03(file03); |
||||
} |
||||
|
||||
private void readAndWrite07(File file) { |
||||
EasyExcelFactory.write(file, TemplateData.class) |
||||
.withTemplate(TestFileUtil.readFile("template" + File.separator + "template07.xlsx")).sheet() |
||||
.doWrite(data()).finish(); |
||||
EasyExcelFactory.read(file, TemplateData.class, new TemplateDataListener()).headRowNumber(2).sheet().doRead() |
||||
.finish(); |
||||
} |
||||
|
||||
private void readAndWrite03(File file) { |
||||
EasyExcelFactory.write(file, TemplateData.class) |
||||
.withTemplate(TestFileUtil.readFile("template" + File.separator + "template03.xls")).sheet().doWrite(data()) |
||||
.finish(); |
||||
EasyExcelFactory.read(file, TemplateData.class, new TemplateDataListener()).headRowNumber(2).sheet().doRead() |
||||
.finish(); |
||||
} |
||||
|
||||
private List<TemplateData> data() { |
||||
List<TemplateData> list = new ArrayList<TemplateData>(); |
||||
TemplateData data = new TemplateData(); |
||||
data.setString0("字符串0"); |
||||
data.setString1("字符串01"); |
||||
TemplateData data1 = new TemplateData(); |
||||
data1.setString0("字符串1"); |
||||
data1.setString1("字符串11"); |
||||
list.add(data); |
||||
list.add(data1); |
||||
return list; |
||||
} |
||||
} |
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue