diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cc68ecf9..e4270c20 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [ 8, 11, 17] + java: [ 8, 11, 17, 21] distribution: [ 'adopt' ] fail-fast: false max-parallel: 4 diff --git a/easyexcel-core/src/main/java/com/alibaba/excel/read/listener/ModelBuildEventListener.java b/easyexcel-core/src/main/java/com/alibaba/excel/read/listener/ModelBuildEventListener.java index c3fb3bc9..fab5a7c6 100644 --- a/easyexcel-core/src/main/java/com/alibaba/excel/read/listener/ModelBuildEventListener.java +++ b/easyexcel-core/src/main/java/com/alibaba/excel/read/listener/ModelBuildEventListener.java @@ -4,9 +4,6 @@ import java.math.BigDecimal; import java.time.LocalDateTime; import java.util.Map; -import javax.print.DocFlavor.STRING; - -import com.alibaba.excel.constant.EasyExcelConstants; import com.alibaba.excel.context.AnalysisContext; import com.alibaba.excel.enums.CellDataTypeEnum; import com.alibaba.excel.enums.HeadKindEnum; @@ -17,15 +14,13 @@ import com.alibaba.excel.metadata.data.DataFormatData; import com.alibaba.excel.metadata.data.ReadCellData; import com.alibaba.excel.read.metadata.holder.ReadSheetHolder; import com.alibaba.excel.read.metadata.property.ExcelReadHeadProperty; +import com.alibaba.excel.support.cglib.beans.BeanMap; import com.alibaba.excel.util.BeanMapUtils; -import com.alibaba.excel.util.BooleanUtils; import com.alibaba.excel.util.ClassUtils; import com.alibaba.excel.util.ConverterUtils; import com.alibaba.excel.util.DateUtils; import com.alibaba.excel.util.MapUtils; -import com.alibaba.excel.util.StringUtils; -import org.springframework.cglib.beans.BeanMap; /** * Convert to the object the user needs diff --git a/easyexcel-core/src/main/java/com/alibaba/excel/util/BeanMapUtils.java b/easyexcel-core/src/main/java/com/alibaba/excel/util/BeanMapUtils.java index 30b2c692..29926aa0 100644 --- a/easyexcel-core/src/main/java/com/alibaba/excel/util/BeanMapUtils.java +++ b/easyexcel-core/src/main/java/com/alibaba/excel/util/BeanMapUtils.java @@ -1,7 +1,7 @@ package com.alibaba.excel.util; -import org.springframework.cglib.beans.BeanMap; -import org.springframework.cglib.core.DefaultNamingPolicy; +import com.alibaba.excel.support.cglib.beans.BeanMap; +import com.alibaba.excel.support.cglib.core.DefaultNamingPolicy; /** * bean utils diff --git a/easyexcel-core/src/main/java/com/alibaba/excel/util/ClassUtils.java b/easyexcel-core/src/main/java/com/alibaba/excel/util/ClassUtils.java index f9a53e08..3f3e14a0 100644 --- a/easyexcel-core/src/main/java/com/alibaba/excel/util/ClassUtils.java +++ b/easyexcel-core/src/main/java/com/alibaba/excel/util/ClassUtils.java @@ -33,6 +33,7 @@ import com.alibaba.excel.metadata.property.ExcelContentProperty; import com.alibaba.excel.metadata.property.FontProperty; import com.alibaba.excel.metadata.property.NumberFormatProperty; import com.alibaba.excel.metadata.property.StyleProperty; +import com.alibaba.excel.support.cglib.beans.BeanMap; import com.alibaba.excel.write.metadata.holder.WriteHolder; import lombok.AllArgsConstructor; @@ -41,7 +42,6 @@ import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.Setter; import org.apache.commons.collections4.CollectionUtils; -import org.springframework.cglib.beans.BeanMap; /** * Licensed to the Apache Software Foundation (ASF) under one or more diff --git a/easyexcel-core/src/main/java/com/alibaba/excel/util/FieldUtils.java b/easyexcel-core/src/main/java/com/alibaba/excel/util/FieldUtils.java index 42cc3e4a..2d5647ca 100644 --- a/easyexcel-core/src/main/java/com/alibaba/excel/util/FieldUtils.java +++ b/easyexcel-core/src/main/java/com/alibaba/excel/util/FieldUtils.java @@ -5,8 +5,7 @@ import java.lang.reflect.Modifier; import java.util.Map; import com.alibaba.excel.metadata.NullObject; - -import org.springframework.cglib.beans.BeanMap; +import com.alibaba.excel.support.cglib.beans.BeanMap; /** * Licensed to the Apache Software Foundation (ASF) under one or more diff --git a/easyexcel-core/src/main/java/com/alibaba/excel/write/executor/ExcelWriteAddExecutor.java b/easyexcel-core/src/main/java/com/alibaba/excel/write/executor/ExcelWriteAddExecutor.java index 2bdd713f..d1d82cc2 100644 --- a/easyexcel-core/src/main/java/com/alibaba/excel/write/executor/ExcelWriteAddExecutor.java +++ b/easyexcel-core/src/main/java/com/alibaba/excel/write/executor/ExcelWriteAddExecutor.java @@ -1,12 +1,10 @@ package com.alibaba.excel.write.executor; -import java.lang.reflect.Field; import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; import java.util.Map; import java.util.Set; -import java.util.TreeMap; import com.alibaba.excel.context.WriteContext; import com.alibaba.excel.enums.HeadKindEnum; @@ -14,6 +12,7 @@ import com.alibaba.excel.metadata.FieldCache; import com.alibaba.excel.metadata.FieldWrapper; import com.alibaba.excel.metadata.Head; import com.alibaba.excel.metadata.property.ExcelContentProperty; +import com.alibaba.excel.support.cglib.beans.BeanMap; import com.alibaba.excel.util.BeanMapUtils; import com.alibaba.excel.util.ClassUtils; import com.alibaba.excel.util.FieldUtils; @@ -30,7 +29,6 @@ import com.alibaba.excel.write.metadata.holder.WriteSheetHolder; import org.apache.commons.collections4.CollectionUtils; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.Row; -import org.springframework.cglib.beans.BeanMap; /** * Add the data into excel diff --git a/easyexcel-support/pom.xml b/easyexcel-support/pom.xml index 20e7c937..85e5a533 100644 --- a/easyexcel-support/pom.xml +++ b/easyexcel-support/pom.xml @@ -21,7 +21,7 @@ org.springframework spring-core - 5.3.27 + 5.3.37 org.springframework diff --git a/easyexcel-test/pom.xml b/easyexcel-test/pom.xml index be59278c..cd1bdb91 100644 --- a/easyexcel-test/pom.xml +++ b/easyexcel-test/pom.xml @@ -29,17 +29,17 @@ com.alibaba.fastjson2 fastjson2 - 2.0.29 + 2.0.51 org.springframework.boot spring-boot-starter-web - 2.7.11 + 2.7.18 org.springframework.boot spring-boot-starter-test - 2.7.11 + 2.7.18 @@ -61,7 +61,7 @@ ch.qos.logback logback-classic - 1.2.12 + 1.5.6 diff --git a/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/temp/Xls03Test.java b/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/temp/Xls03Test.java index 7d5a4490..a43525ae 100644 --- a/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/temp/Xls03Test.java +++ b/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/temp/Xls03Test.java @@ -3,14 +3,14 @@ package com.alibaba.easyexcel.test.temp; import java.util.List; import com.alibaba.excel.EasyExcel; +import com.alibaba.excel.support.cglib.beans.BeanMap; +import com.alibaba.excel.support.cglib.core.DebuggingClassWriter; import com.alibaba.excel.util.BeanMapUtils; import com.alibaba.fastjson2.JSON; import org.junit.jupiter.api.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.cglib.beans.BeanMap; -import org.springframework.cglib.core.DebuggingClassWriter; /** * 临时测试 diff --git a/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/temp/write/TempWriteTest.java b/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/temp/write/TempWriteTest.java index 8c75deab..9f66a507 100644 --- a/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/temp/write/TempWriteTest.java +++ b/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/temp/write/TempWriteTest.java @@ -8,6 +8,7 @@ import java.util.Map; import com.alibaba.easyexcel.test.demo.read.CustomStringStringConverter; import com.alibaba.easyexcel.test.util.TestFileUtil; import com.alibaba.excel.EasyExcel; +import com.alibaba.excel.support.cglib.beans.BeanMap; import com.alibaba.excel.util.BeanMapUtils; import com.alibaba.excel.util.FileUtils; import com.alibaba.excel.util.ListUtils; @@ -24,7 +25,6 @@ import org.apache.poi.xssf.streaming.SXSSFSheet; import org.apache.poi.xssf.streaming.SXSSFWorkbook; import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.junit.jupiter.api.Test; -import org.springframework.cglib.beans.BeanMap; @Slf4j public class TempWriteTest { diff --git a/pom.xml b/pom.xml index 2d38e69c..24f54ddc 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ - 4.0.0-beta1 + 4.0.0 UTF-8 1.8 true @@ -90,40 +90,45 @@ com.alibaba easyexcel-support - ${revision} + 3.3.4 org.apache.poi poi - 5.2.3 + 5.2.5 org.apache.poi poi-ooxml - 5.2.3 + 5.2.5 org.apache.commons commons-csv - 1.10.0 + 1.11.0 org.ehcache ehcache - 3.9.9 + 3.10.8 commons-io commons-io 2.11.0 + + org.slf4j + slf4j-api + 1.7.36 + org.projectlombok lombok - 1.18.26 + 1.18.32 @@ -313,31 +318,6 @@ - - org.apache.maven.plugins - maven-shade-plugin - - - package - - shade - - - - - ${project.groupId}:${project.artifactId} - - - - - org.springframework - com.alibaba.excel.support - - - - - - org.codehaus.mojo diff --git a/update.md b/update.md index 49416303..74ca52ed 100644 --- a/update.md +++ b/update.md @@ -1,7 +1,7 @@ -# 4.0.0-beta1 +# 4.0.0 -* `poi`由`4.1.2`升级到`5.2.3` -* `commons-csv`由`1.9.0`升级到`1.10.0` +* `poi`由`4.1.2`升级到`5.2.5` +* `commons-csv`由`1.1.0`升级到`1.10.0` * `slf4j-api`由`1.7.32`升级到`1.7.36` * `ehcache`由`3.9.9`升级到`3.10.8`