diff --git a/README.md b/README.md
index 25750de..6e898ef 100644
--- a/README.md
+++ b/README.md
@@ -105,7 +105,7 @@ List products = Arrays.asList(
);
// 3. Export to Excel
-ExcelExporter exporter = ExcelExporter.builder(Product.class, products)
+DefaultExcelExporter exporter = DefaultExcelExporter.builder(Product.class, products)
.sheetStrategy(SheetStrategy.MULTI_SHEET) // Optional, MULTI_SHEET is default
.maxRows(100) // Optional, Max row of SpreadsheetVersion.EXCEL2007 is default
.sheetName("Products") // Optional, if not specified sheets will be named Sheet0, Sheet1, etc.
diff --git a/build.gradle b/build.gradle
index a4b845b..3cc273b 100644
--- a/build.gradle
+++ b/build.gradle
@@ -19,7 +19,7 @@ repositories {
java {
toolchain {
- languageVersion = JavaLanguageVersion.of(23)
+ languageVersion = JavaLanguageVersion.of(21)
}
withSourcesJar() // 소스 코드도 포함
}
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 9355b41..ca025c8 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
diff --git a/src/main/java/io/github/hee9841/excel/annotation/Excel.java b/src/main/java/io/github/hee9841/excel/annotation/Excel.java
index ea79191..e4adf85 100644
--- a/src/main/java/io/github/hee9841/excel/annotation/Excel.java
+++ b/src/main/java/io/github/hee9841/excel/annotation/Excel.java
@@ -41,7 +41,7 @@
*
* // Usage example:
* List{@literal <}UserData{@literal >} users = getUserData();
- * ExcelExporter{@literal <}UserData{@literal >} exporter = ExcelExporter.builder(UserData.class, users)
+ * DefaultExcelExporter{@literal <}UserData{@literal >} exporter = DefaultExcelExporter.builder(UserData.class, users)
* .sheetName("Users")
* .build();
* exporter.write(new FileOutputStream("users.xlsx"));
diff --git a/src/main/java/io/github/hee9841/excel/annotation/ExcelColumn.java b/src/main/java/io/github/hee9841/excel/annotation/ExcelColumn.java
index d1ee435..70b0feb 100644
--- a/src/main/java/io/github/hee9841/excel/annotation/ExcelColumn.java
+++ b/src/main/java/io/github/hee9841/excel/annotation/ExcelColumn.java
@@ -1,7 +1,7 @@
package io.github.hee9841.excel.annotation;
import io.github.hee9841.excel.format.CellFormats;
-import io.github.hee9841.excel.meta.ColumnDataType;
+import io.github.hee9841.excel.core.meta.ColumnDataType;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
diff --git a/src/main/java/io/github/hee9841/excel/core/ExcelExporter.java b/src/main/java/io/github/hee9841/excel/core/exporter/DefaultExcelExporter.java
similarity index 88%
rename from src/main/java/io/github/hee9841/excel/core/ExcelExporter.java
rename to src/main/java/io/github/hee9841/excel/core/exporter/DefaultExcelExporter.java
index bacaaff..a75fe65 100644
--- a/src/main/java/io/github/hee9841/excel/core/ExcelExporter.java
+++ b/src/main/java/io/github/hee9841/excel/core/exporter/DefaultExcelExporter.java
@@ -1,4 +1,4 @@
-package io.github.hee9841.excel.core;
+package io.github.hee9841.excel.core.exporter;
import io.github.hee9841.excel.exception.ExcelException;
import io.github.hee9841.excel.strategy.SheetStrategy;
@@ -6,26 +6,26 @@
import java.util.List;
/**
- * ExcelExporter is a concrete implementation of {@link SXSSFExcelFile} that provides functionality
+ * DefaultExcelExporter is a concrete implementation of {@link SXSSFExporter} that provides functionality
* for exporting data to Excel files. This class uses the SXSSFWorkbook from Apache POI for
* efficient
* handling of large datasets by streaming data to disk.
*
- * The ExcelExporter supports two sheet management strategies:
+ * The DefaultExcelExporter supports two sheet management strategies:
*
* - ONE_SHEET - All data is exported to a single sheet (limited by max rows per sheet)
* - MULTI_SHEET - Data is split across multiple sheets when exceeding max rows per sheet
*
*
- * Use the {@link ExcelExporterBuilder} to configure and instantiate this class.
+ * Use the {@link DefaultExcelExporterBuilder} to configure and instantiate this class.
*
* @param The type of data to be exported to Excel. The type must be annotated appropriately
* for Excel column mapping using the library's annotation system.
- * @see SXSSFExcelFile
- * @see ExcelExporterBuilder
+ * @see SXSSFExporter
+ * @see DefaultExcelExporterBuilder
* @see SheetStrategy
*/
-public class ExcelExporter extends SXSSFExcelFile {
+public class DefaultExcelExporter extends SXSSFExporter {
private static final String EXCEED_MAX_ROW_MSG_2ARGS =
"The data size exceeds the maximum number of rows allowed per sheet. "
@@ -44,10 +44,10 @@ public class ExcelExporter extends SXSSFExcelFile {
/**
- * Constructs an ExcelExporter with the specified configuration.
+ * Constructs an DefaultExcelExporter with the specified configuration.
*
- * This constructor is not meant to be called directly. Use {@link ExcelExporterBuilder}
- * to create instances of ExcelExporter.
+ * This constructor is not meant to be called directly. Use {@link DefaultExcelExporterBuilder}
+ * to create instances of DefaultExcelExporter.
*
* @param type The class type of the data to be exported
* @param data The list of data objects to be exported
@@ -55,7 +55,7 @@ public class ExcelExporter extends SXSSFExcelFile {
* @param sheetName Base name for sheets (null for default names)
* @param maxRowsPerSheet Maximum number of rows allowed per sheet
*/
- ExcelExporter(
+ DefaultExcelExporter(
Class type,
List data,
SheetStrategy sheetStrategy,
@@ -74,15 +74,15 @@ public class ExcelExporter extends SXSSFExcelFile {
/**
- * Creates a new builder for configuring and instantiating an ExcelExporter.
+ * Creates a new builder for configuring and instantiating an DefaultExcelExporter.
*
* @param The type of data to be exported
* @param type The class of the data type
* @param data The list of data objects to be exported
- * @return A new ExcelExporterBuilder instance
+ * @return A new DefaultExcelExporterBuilder instance
*/
- public static ExcelExporterBuilder builder(Class type, List data) {
- return new ExcelExporterBuilder<>(type, data, supplyExcelVersion.getMaxRows());
+ public static DefaultExcelExporterBuilder builder(Class type, List data) {
+ return new DefaultExcelExporterBuilder<>(type, data, supplyExcelVersion.getMaxRows());
}
diff --git a/src/main/java/io/github/hee9841/excel/core/ExcelExporterBuilder.java b/src/main/java/io/github/hee9841/excel/core/exporter/DefaultExcelExporterBuilder.java
similarity index 78%
rename from src/main/java/io/github/hee9841/excel/core/ExcelExporterBuilder.java
rename to src/main/java/io/github/hee9841/excel/core/exporter/DefaultExcelExporterBuilder.java
index bcb8b2e..c9519cf 100644
--- a/src/main/java/io/github/hee9841/excel/core/ExcelExporterBuilder.java
+++ b/src/main/java/io/github/hee9841/excel/core/exporter/DefaultExcelExporterBuilder.java
@@ -1,11 +1,11 @@
-package io.github.hee9841.excel.core;
+package io.github.hee9841.excel.core.exporter;
import io.github.hee9841.excel.exception.ExcelException;
import io.github.hee9841.excel.strategy.SheetStrategy;
import java.util.List;
/**
- * Builder class for creating and configuring {@link ExcelExporter} instances.
+ * Builder class for creating and configuring {@link DefaultExcelExporter} instances.
* This class implements the Builder pattern to provide a fluent interface for
* configuring Excel export settings.
*
@@ -18,7 +18,7 @@
*
* Example usage:
*
- * ExcelExporter<MyData> exporter = ExcelExporter.builder(MyData.class, dataList)
+ * DefaultExcelExporter<MyData> exporter = DefaultExcelExporter.builder(MyData.class, dataList)
* .sheetStrategy(SheetStrategy.ONE_SHEET)
* .maxRows(10000)
* .sheetName("MySheet")
@@ -27,7 +27,7 @@
*
* @param The type of data to be exported
*/
-public class ExcelExporterBuilder {
+public class DefaultExcelExporterBuilder {
private final Class type;
private final List data;
@@ -39,13 +39,13 @@ public class ExcelExporterBuilder {
private String sheetName;
/**
- * Constructs a new ExcelExporterBuilder with the specified type and data.
+ * Constructs a new DefaultExcelExporterBuilder with the specified type and data.
*
* @param type The class type of the data to be exported
* @param data The list of data objects to be exported
* @param supplyExcelMaxRows The maximum number of rows supported by the Excel version
*/
- ExcelExporterBuilder(
+ DefaultExcelExporterBuilder(
Class type,
List data,
int supplyExcelMaxRows
@@ -64,7 +64,7 @@ public class ExcelExporterBuilder {
* @param sheetStrategy The strategy to use for sheet management (ONE_SHEET or MULTI_SHEET)
* @return This builder instance for method chaining
*/
- public ExcelExporterBuilder sheetStrategy(SheetStrategy sheetStrategy) {
+ public DefaultExcelExporterBuilder sheetStrategy(SheetStrategy sheetStrategy) {
this.sheetStrategy = sheetStrategy;
return this;
}
@@ -76,7 +76,7 @@ public ExcelExporterBuilder sheetStrategy(SheetStrategy sheetStrategy) {
* @return This builder instance for method chaining
* @throws ExcelException if maxRowsPerSheet exceeds the Excel version's maximum row limit
*/
- public ExcelExporterBuilder maxRows(int maxRowsPerSheet) {
+ public DefaultExcelExporterBuilder maxRows(int maxRowsPerSheet) {
if (maxRowsPerSheet > supplyExcelMaxRows) {
throw new ExcelException(String.format(
"The maximum rows per sheet(%d) cannot exceed the supplied Excel sheet version's maximum row limit(%d).",
@@ -99,18 +99,18 @@ public ExcelExporterBuilder maxRows(int maxRowsPerSheet) {
* @param sheetName The base name for sheets
* @return This builder instance for method chaining
*/
- public ExcelExporterBuilder sheetName(String sheetName) {
+ public DefaultExcelExporterBuilder sheetName(String sheetName) {
this.sheetName = sheetName;
return this;
}
/**
- * Builds and returns a new ExcelExporter instance with the configured settings.
+ * Builds and returns a new DefaultExcelExporter instance with the configured settings.
*
- * @return A new ExcelExporter instance
+ * @return A new DefaultExcelExporter instance
*/
- public ExcelExporter build() {
- return new ExcelExporter(
+ public DefaultExcelExporter build() {
+ return new DefaultExcelExporter(
this.type,
this.data,
this.sheetStrategy,
diff --git a/src/main/java/io/github/hee9841/excel/core/ExcelFile.java b/src/main/java/io/github/hee9841/excel/core/exporter/ExcelExporter.java
similarity index 91%
rename from src/main/java/io/github/hee9841/excel/core/ExcelFile.java
rename to src/main/java/io/github/hee9841/excel/core/exporter/ExcelExporter.java
index 676db1e..30903d5 100644
--- a/src/main/java/io/github/hee9841/excel/core/ExcelFile.java
+++ b/src/main/java/io/github/hee9841/excel/core/exporter/ExcelExporter.java
@@ -1,4 +1,4 @@
-package io.github.hee9841.excel.core;
+package io.github.hee9841.excel.core.exporter;
import java.io.IOException;
import java.io.OutputStream;
@@ -16,7 +16,7 @@
*
* @param The type of data to be handled in the Excel file
*/
-public interface ExcelFile {
+public interface ExcelExporter {
/**
* Writes the Excel file content to the specified output stream.
diff --git a/src/main/java/io/github/hee9841/excel/core/SXSSFExcelFile.java b/src/main/java/io/github/hee9841/excel/core/exporter/SXSSFExporter.java
similarity index 94%
rename from src/main/java/io/github/hee9841/excel/core/SXSSFExcelFile.java
rename to src/main/java/io/github/hee9841/excel/core/exporter/SXSSFExporter.java
index d7aecda..3b6c0d1 100644
--- a/src/main/java/io/github/hee9841/excel/core/SXSSFExcelFile.java
+++ b/src/main/java/io/github/hee9841/excel/core/exporter/SXSSFExporter.java
@@ -1,8 +1,8 @@
-package io.github.hee9841.excel.core;
+package io.github.hee9841.excel.core.exporter;
import io.github.hee9841.excel.exception.ExcelException;
-import io.github.hee9841.excel.meta.ColumnInfo;
-import io.github.hee9841.excel.meta.ColumnInfoMapper;
+import io.github.hee9841.excel.core.meta.ColumnInfo;
+import io.github.hee9841.excel.core.meta.ColumnInfoMapper;
import java.io.IOException;
import java.io.OutputStream;
import java.lang.reflect.Field;
@@ -36,9 +36,9 @@
*
* @param The type of data to be handled in the Excel file
*/
-public abstract class SXSSFExcelFile implements ExcelFile {
+public abstract class SXSSFExporter implements ExcelExporter {
- protected static final Logger logger = LoggerFactory.getLogger(SXSSFExcelFile.class);
+ protected static final Logger logger = LoggerFactory.getLogger(SXSSFExporter.class);
protected static final SpreadsheetVersion supplyExcelVersion = SpreadsheetVersion.EXCEL2007;
@@ -49,9 +49,9 @@ public abstract class SXSSFExcelFile implements ExcelFile {
protected String dtoTypeName;
/**
- * Constructs a new SXSSFExcelFile with a new SXSSFWorkbook instance.
+ * Constructs a new SXSSFExporter with a new SXSSFWorkbook instance.
*/
- protected SXSSFExcelFile() {
+ protected SXSSFExporter() {
this.workbook = new SXSSFWorkbook();
}
diff --git a/src/main/java/io/github/hee9841/excel/meta/ColumnDataType.java b/src/main/java/io/github/hee9841/excel/core/meta/ColumnDataType.java
similarity index 99%
rename from src/main/java/io/github/hee9841/excel/meta/ColumnDataType.java
rename to src/main/java/io/github/hee9841/excel/core/meta/ColumnDataType.java
index 6b0d000..a614757 100644
--- a/src/main/java/io/github/hee9841/excel/meta/ColumnDataType.java
+++ b/src/main/java/io/github/hee9841/excel/core/meta/ColumnDataType.java
@@ -1,4 +1,4 @@
-package io.github.hee9841.excel.meta;
+package io.github.hee9841.excel.core.meta;
import io.github.hee9841.excel.annotation.ExcelColumnStyle;
import io.github.hee9841.excel.exception.ExcelException;
@@ -30,10 +30,12 @@ public enum ColumnDataType {
* Automatically determine the cell type based on the field type
*/
AUTO,
+
/**
* No specific cell type (default)
*/
_NONE,
+
/**
* Numeric cell type for various number formats
*/
@@ -50,6 +52,7 @@ public enum ColumnDataType {
CellFormats._NONE,
true
),
+
/**
* Boolean cell type
*/
@@ -61,6 +64,7 @@ public enum ColumnDataType {
CellFormats._NONE,
true
),
+
/**
* String cell type for text values
*/
@@ -72,6 +76,7 @@ public enum ColumnDataType {
CellFormats._NONE,
true
),
+
/**
* Enum cell type - uses toString() to get the value
*/
@@ -81,6 +86,7 @@ public enum ColumnDataType {
CellFormats._NONE,
true
),
+
/**
* Formula cell type - value is treated as an Excel formula
*/
diff --git a/src/main/java/io/github/hee9841/excel/meta/ColumnInfo.java b/src/main/java/io/github/hee9841/excel/core/meta/ColumnInfo.java
similarity index 98%
rename from src/main/java/io/github/hee9841/excel/meta/ColumnInfo.java
rename to src/main/java/io/github/hee9841/excel/core/meta/ColumnInfo.java
index 8329fb2..179cd4b 100644
--- a/src/main/java/io/github/hee9841/excel/meta/ColumnInfo.java
+++ b/src/main/java/io/github/hee9841/excel/core/meta/ColumnInfo.java
@@ -1,4 +1,4 @@
-package io.github.hee9841.excel.meta;
+package io.github.hee9841.excel.core.meta;
import io.github.hee9841.excel.annotation.ExcelColumnStyle;
import org.apache.poi.ss.usermodel.CellStyle;
diff --git a/src/main/java/io/github/hee9841/excel/meta/ColumnInfoMapper.java b/src/main/java/io/github/hee9841/excel/core/meta/ColumnInfoMapper.java
similarity index 99%
rename from src/main/java/io/github/hee9841/excel/meta/ColumnInfoMapper.java
rename to src/main/java/io/github/hee9841/excel/core/meta/ColumnInfoMapper.java
index b56ed60..fd327b6 100644
--- a/src/main/java/io/github/hee9841/excel/meta/ColumnInfoMapper.java
+++ b/src/main/java/io/github/hee9841/excel/core/meta/ColumnInfoMapper.java
@@ -1,4 +1,4 @@
-package io.github.hee9841.excel.meta;
+package io.github.hee9841.excel.core.meta;
import static io.github.hee9841.excel.global.SystemValues.ALLOWED_FIELD_TYPES;
import static io.github.hee9841.excel.global.SystemValues.ALLOWED_FIELD_TYPES_STRING;
diff --git a/src/main/java/io/github/hee9841/excel/strategy/CellTypeStrategy.java b/src/main/java/io/github/hee9841/excel/strategy/CellTypeStrategy.java
index 6a51f44..7bc79e4 100644
--- a/src/main/java/io/github/hee9841/excel/strategy/CellTypeStrategy.java
+++ b/src/main/java/io/github/hee9841/excel/strategy/CellTypeStrategy.java
@@ -1,13 +1,12 @@
package io.github.hee9841.excel.strategy;
-import io.github.hee9841.excel.meta.ColumnDataType;
/**
* Strategy enum that determines how cell types are assigned in Excel sheets.
*
* This enum defines strategies for determining the data type and format of cells
* when exporting data to Excel. It works in conjunction with the
- * {@link ColumnDataType} enum to control how different Java types
+ * {@link io.github.hee9841.excel.core.meta.ColumnDataType} enum to control how different Java types
* are represented in Excel.
*
* The available strategies are:
@@ -26,8 +25,8 @@
*
* @see io.github.hee9841.excel.annotation.Excel#cellTypeStrategy()
* @see io.github.hee9841.excel.annotation.ExcelColumn#columnCellType()
- * @see ColumnDataType
- * @see io.github.hee9841.excel.meta.ColumnInfoMapper
+ * @see io.github.hee9841.excel.core.meta.ColumnDataType
+ * @see io.github.hee9841.excel.core.meta.ColumnInfoMapper
* @see DataFormatStrategy
*/
public enum CellTypeStrategy {
@@ -36,7 +35,7 @@ public enum CellTypeStrategy {
*
* With this strategy, you can explicitly specify the cell type for each column
* using the {@link io.github.hee9841.excel.annotation.ExcelColumn#columnCellType()} parameter
- * or if not specified, cell type will be {@link ColumnDataType#_NONE}.
+ * or if not specified, cell type will be {@link io.github.hee9841.excel.core.meta.ColumnDataType#_NONE}.
*
*/
NONE,
@@ -50,7 +49,7 @@ public enum CellTypeStrategy {
*
*
* The automatic cell type determination is performed by the
- * {@link io.github.hee9841.excel.meta.ColumnInfoMapper} class.
+ * {@link io.github.hee9841.excel.core.meta.ColumnInfoMapper} class.
* If you want to specify the cell type for a specific column, you can use the
* {@link io.github.hee9841.excel.annotation.ExcelColumn#columnCellType()} parameter.
*
diff --git a/src/main/java/io/github/hee9841/excel/strategy/ColumnIndexStrategy.java b/src/main/java/io/github/hee9841/excel/strategy/ColumnIndexStrategy.java
index d8ccf14..dcfffa7 100644
--- a/src/main/java/io/github/hee9841/excel/strategy/ColumnIndexStrategy.java
+++ b/src/main/java/io/github/hee9841/excel/strategy/ColumnIndexStrategy.java
@@ -22,7 +22,7 @@
*
* @see io.github.hee9841.excel.annotation.Excel#columnIndexStrategy()
* @see io.github.hee9841.excel.annotation.ExcelColumn#columnIndex()
- * @see io.github.hee9841.excel.meta.ColumnInfoMapper
+ * @see io.github.hee9841.excel.core.meta.ColumnInfoMapper
*/
public enum ColumnIndexStrategy {
/**
diff --git a/src/main/java/io/github/hee9841/excel/strategy/DataFormatStrategy.java b/src/main/java/io/github/hee9841/excel/strategy/DataFormatStrategy.java
index a88224d..0eccc0d 100644
--- a/src/main/java/io/github/hee9841/excel/strategy/DataFormatStrategy.java
+++ b/src/main/java/io/github/hee9841/excel/strategy/DataFormatStrategy.java
@@ -1,20 +1,18 @@
package io.github.hee9841.excel.strategy;
-import io.github.hee9841.excel.meta.ColumnDataType;
-
/**
* Strategy enum that determines how data formatting is applied to Excel cells.
*
* This enum defines strategies for controlling how cell formatting patterns are determined and
* applied during
- * Excel export operations. It works in conjunction with the {@link ColumnDataType}
+ * Excel export operations. It works in conjunction with the {@link io.github.hee9841.excel.core.meta.ColumnDataType}
* to apply appropriate formatting to different types of data.
*
* The available strategies are:
*
* - {@code NONE}: No automatic formatting is applied. Formatting must be explicitly specified
* in the {@link io.github.hee9841.excel.annotation.ExcelColumn} annotation.
- * - {@code AUTO_BY_CELL_TYPE}: Automatic formatting is applied based on the {@link ColumnDataType}, but only when the
+ *
- {@code AUTO_BY_CELL_TYPE}: Automatic formatting is applied based on the {@link io.github.hee9841.excel.core.meta.ColumnDataType}, but only when the
* {@link io.github.hee9841.excel.annotation.ExcelColumn#columnCellType()} is explicitly set or determined by the {@link CellTypeStrategy} (not when it's NONE).
* If user specified the {@code format} parameter in the {@link io.github.hee9841.excel.annotation.ExcelColumn} annotation, it will take precedence over the automatic format.
*
@@ -24,7 +22,7 @@
* annotation and affects all columns unless overridden at the column level.
*
* @see io.github.hee9841.excel.annotation.Excel#dataFormatStrategy()
- * @see ColumnDataType
+ * @see io.github.hee9841.excel.core.meta.ColumnDataType
* @see io.github.hee9841.excel.format.ExcelDataFormater
* @see io.github.hee9841.excel.format.CellFormats
*/
@@ -45,7 +43,7 @@ public enum DataFormatStrategy {
*
* This strategy only applies when the cell type is explicitly set (not NONE) or
* determined by the {@link CellTypeStrategy} (when set to AUTO). It uses the format
- * pattern defined for each {@link ColumnDataType} to format
+ * pattern defined for each {@link io.github.hee9841.excel.core.meta.ColumnDataType} to format
* the cell appropriately for its data type.
*
* Note: If a format pattern is explicitly specified in the
diff --git a/src/main/java/io/github/hee9841/excel/strategy/SheetStrategy.java b/src/main/java/io/github/hee9841/excel/strategy/SheetStrategy.java
index 0bfa93a..3c8fa00 100644
--- a/src/main/java/io/github/hee9841/excel/strategy/SheetStrategy.java
+++ b/src/main/java/io/github/hee9841/excel/strategy/SheetStrategy.java
@@ -3,6 +3,7 @@
import static org.apache.commons.compress.archivers.zip.Zip64Mode.Always;
import static org.apache.commons.compress.archivers.zip.Zip64Mode.AsNeeded;
+
import java.util.Objects;
import org.apache.commons.compress.archivers.zip.Zip64Mode;
diff --git a/src/test/java/io/github/hee9841/excel/core/ExcelExporterByteOutputStreamTest.java b/src/test/java/io/github/hee9841/excel/core/exporter/DefaultExcelExporterByteOutputStreamTest.java
similarity index 95%
rename from src/test/java/io/github/hee9841/excel/core/ExcelExporterByteOutputStreamTest.java
rename to src/test/java/io/github/hee9841/excel/core/exporter/DefaultExcelExporterByteOutputStreamTest.java
index fb182b6..acc43a9 100644
--- a/src/test/java/io/github/hee9841/excel/core/ExcelExporterByteOutputStreamTest.java
+++ b/src/test/java/io/github/hee9841/excel/core/exporter/DefaultExcelExporterByteOutputStreamTest.java
@@ -1,4 +1,4 @@
-package io.github.hee9841.excel.core;
+package io.github.hee9841.excel.core.exporter;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
@@ -52,8 +52,8 @@
import org.slf4j.LoggerFactory;
-@DisplayName("ExcelExporter 테스트")
-class ExcelExporterByteOutputStreamTest {
+@DisplayName("DefaultExcelExporter 테스트")
+class DefaultExcelExporterByteOutputStreamTest {
MemoryAppender memoryAppender;
String loggerClassName;
@@ -61,8 +61,8 @@ class ExcelExporterByteOutputStreamTest {
@BeforeEach
void beforeEach() {
- Logger logger = (Logger) LoggerFactory.getLogger(SXSSFExcelFile.class);
- loggerClassName = SXSSFExcelFile.class.getName();
+ Logger logger = (Logger) LoggerFactory.getLogger(SXSSFExporter.class);
+ loggerClassName = SXSSFExporter.class.getName();
memoryAppender = new MemoryAppender();
memoryAppender.setContext((LoggerContext) LoggerFactory.getILoggerFactory());
logger.setLevel(Level.DEBUG);
@@ -92,7 +92,7 @@ void dataSizeExceedMaxRowsThrowsException() {
// when & then
ExcelException exception = assertThrows(ExcelException.class, () ->
- ExcelExporter.builder(TestDto.class, data)
+ DefaultExcelExporter.builder(TestDto.class, data)
.maxRows(maxRows)
.sheetStrategy(
SheetStrategy.ONE_SHEET) // Force ONE_SHEET strategy to ensure exception is thrown
@@ -113,7 +113,7 @@ void cannotExceedMaxRowOfImplementation() {
int maxRowOfExcel2007 = 0x100000; // Excel 2007 최대 행 수 초과
// when
- ExcelException exception = assertThrows(ExcelException.class, () -> ExcelExporter
+ ExcelException exception = assertThrows(ExcelException.class, () -> DefaultExcelExporter
.builder(TestDto.class, data)
.maxRows(maxRowOfExcel2007 + 1)
.build());
@@ -131,7 +131,7 @@ void validateLogSequence() throws IOException {
data.add(new TestDto("test1", 1));
data.add(new TestDto("test2", 2));
- ExcelExporter exporter = ExcelExporter
+ DefaultExcelExporter exporter = DefaultExcelExporter
.builder(TestDto.class, data).build();
exporter.write(os);
@@ -157,7 +157,7 @@ void createEmptyExcelFile() throws IOException {
// given
List emptyData = new ArrayList<>();
- ExcelExporter exporter = ExcelExporter
+ DefaultExcelExporter exporter = DefaultExcelExporter
.builder(TestDto.class, emptyData)
.build();
@@ -193,7 +193,7 @@ void multiSheetMaxRowsExceedTest() throws IOException {
testData.add(new TestDto("test" + (i + 1), i + 1));
}
// when
- ExcelExporter.builder(TestDto.class, testData)
+ DefaultExcelExporter.builder(TestDto.class, testData)
.maxRows(10)
.build().write(os);
@@ -237,7 +237,7 @@ void throwExceptionWhenOneSheetAndExceedMaxRows() {
//when
ExcelException exception = assertThrows(ExcelException.class,
- () -> ExcelExporter.builder(TestDto.class, testData)
+ () -> DefaultExcelExporter.builder(TestDto.class, testData)
.maxRows(10)
.sheetStrategy(SheetStrategy.ONE_SHEET)
.build()
@@ -265,7 +265,7 @@ void createSheetWithSpecifiedName() throws IOException {
}
//when
- ExcelExporter.builder(TestDto.class, testData)
+ DefaultExcelExporter.builder(TestDto.class, testData)
.sheetName("TestSheet")
.maxRows(10)
.build()
@@ -300,7 +300,7 @@ void checkFormulaType() throws IOException {
}
//when
- ExcelExporter.builder(TypeAutoDto.class, testData)
+ DefaultExcelExporter.builder(TypeAutoDto.class, testData)
.sheetName("TestSheet")
.build()
.write(os);
@@ -346,7 +346,7 @@ class TestDto {
testData.add(new TestDto());
//when
- ExcelExporter.builder(TestDto.class, testData)
+ DefaultExcelExporter.builder(TestDto.class, testData)
.build()
.write(os);
@@ -402,7 +402,7 @@ void createExcelFileWithSpecifiedCellStyle() throws IOException {
testData.add(new TestDto("name value", 1));
//when
- ExcelExporter.builder(TestDto.class, testData)
+ DefaultExcelExporter.builder(TestDto.class, testData)
.build()
.write(os);
@@ -454,7 +454,7 @@ void createExcelFileWithSpecifiedDataFormat() throws IOException {
String signUpDatePattern = CellFormats.DEFAULT_DATE_FORMAT;
//when
- ExcelExporter.builder(TestDto.class, testData)
+ DefaultExcelExporter.builder(TestDto.class, testData)
.build()
.write(os);
diff --git a/src/test/java/io/github/hee9841/excel/meta/CellStyleMappingTest.java b/src/test/java/io/github/hee9841/excel/core/meta/CellStyleMappingTest.java
similarity index 99%
rename from src/test/java/io/github/hee9841/excel/meta/CellStyleMappingTest.java
rename to src/test/java/io/github/hee9841/excel/core/meta/CellStyleMappingTest.java
index 5deeeb5..7d9045b 100644
--- a/src/test/java/io/github/hee9841/excel/meta/CellStyleMappingTest.java
+++ b/src/test/java/io/github/hee9841/excel/core/meta/CellStyleMappingTest.java
@@ -1,4 +1,4 @@
-package io.github.hee9841.excel.meta;
+package io.github.hee9841.excel.core.meta;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertInstanceOf;
diff --git a/src/test/java/io/github/hee9841/excel/meta/ColumnDataTypeTest.java b/src/test/java/io/github/hee9841/excel/core/meta/ColumnDataTypeTest.java
similarity index 99%
rename from src/test/java/io/github/hee9841/excel/meta/ColumnDataTypeTest.java
rename to src/test/java/io/github/hee9841/excel/core/meta/ColumnDataTypeTest.java
index 2b45d0e..824a34b 100644
--- a/src/test/java/io/github/hee9841/excel/meta/ColumnDataTypeTest.java
+++ b/src/test/java/io/github/hee9841/excel/core/meta/ColumnDataTypeTest.java
@@ -1,4 +1,4 @@
-package io.github.hee9841.excel.meta;
+package io.github.hee9841.excel.core.meta;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.mockito.BDDMockito.then;
diff --git a/src/test/java/io/github/hee9841/excel/meta/ColumnInfoMapperTest.java b/src/test/java/io/github/hee9841/excel/core/meta/ColumnInfoMapperTest.java
similarity index 99%
rename from src/test/java/io/github/hee9841/excel/meta/ColumnInfoMapperTest.java
rename to src/test/java/io/github/hee9841/excel/core/meta/ColumnInfoMapperTest.java
index 4e50cea..d39d136 100644
--- a/src/test/java/io/github/hee9841/excel/meta/ColumnInfoMapperTest.java
+++ b/src/test/java/io/github/hee9841/excel/core/meta/ColumnInfoMapperTest.java
@@ -1,4 +1,4 @@
-package io.github.hee9841.excel.meta;
+package io.github.hee9841.excel.core.meta;
import static io.github.hee9841.excel.strategy.ColumnIndexStrategy.USER_DEFINED;
import static org.junit.jupiter.api.Assertions.assertEquals;
diff --git a/src/test/java/io/github/hee9841/excel/example/dto/TypeAutoDto.java b/src/test/java/io/github/hee9841/excel/example/dto/TypeAutoDto.java
index f8bb114..dde43d5 100644
--- a/src/test/java/io/github/hee9841/excel/example/dto/TypeAutoDto.java
+++ b/src/test/java/io/github/hee9841/excel/example/dto/TypeAutoDto.java
@@ -2,7 +2,7 @@
import io.github.hee9841.excel.annotation.Excel;
import io.github.hee9841.excel.annotation.ExcelColumn;
-import io.github.hee9841.excel.meta.ColumnDataType;
+import io.github.hee9841.excel.core.meta.ColumnDataType;
import io.github.hee9841.excel.strategy.CellTypeStrategy;
import io.github.hee9841.excel.strategy.ColumnIndexStrategy;
import java.time.LocalDate;