Skip to content

Commit

Permalink
⬆️ Upgrading dependencies. springboot 3.1.1 & easyexcel 3.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
lbw committed Jun 28, 2023
1 parent 3716215 commit d2f5bfc
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ EasyExcel是一个基于Java的简单、省内存的读写Excel的开源项目

- 项目已上传至 maven 仓库,直接引入即可使用

| 版本 | 支持 |
| 版本 | 支持 |
|-------|--|
| 3.0.0 | 适配 SpringBoot3.x |
| 3.1.0 | 适配 SpringBoot3.x |
| 1.2.7 | 适配 SpringBoot2.x |

```xml
Expand Down Expand Up @@ -466,6 +466,10 @@ public class SetConverter implements Converter<Set<?>> {
## 高级用法模板导出

```java
/**
* 默认读取 classpath:excel/ 目录下的模板文件,具体模板使用参考官方文档
*
*/
@ResponseExcel(name = "模板测试excel", sheet = "sheetName",template = "example.xlsx")
@GetMapping("/e1")
public List<DemoData> e1() {
Expand Down
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.0.0</version>
<version>3.1.1</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.pig4cloud.excel</groupId>
<artifactId>excel-spring-boot-starter</artifactId>
<version>3.0.1-SNAPSHOT</version>
<version>3.1.0</version>
<name>excel-spring-boot-starter</name>
<description>easy and high performance excel</description>
<url>https://pig4cloud.com</url>
Expand All @@ -36,9 +36,9 @@
</scm>
<properties>
<java.version>17</java.version>
<easyexcel.version>3.1.1</easyexcel.version>
<easyexcel.version>3.3.2</easyexcel.version>
<mica.version>3.0.0</mica.version>
<spring.checkstyle.plugin>0.0.32</spring.checkstyle.plugin>
<spring.checkstyle.plugin>0.0.39</spring.checkstyle.plugin>
<git.commit.plugin>2.2.5</git.commit.plugin>
<commons-compress>1.21</commons-compress>
</properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,8 @@ public ExcelWriter getExcelWriter(HttpServletResponse response, ResponseExcel re
writerBuilder.excludeColumnFieldNames(Arrays.asList(responseExcel.exclude()));
}

if (responseExcel.writeHandler().length != 0) {
for (Class<? extends WriteHandler> clazz : responseExcel.writeHandler()) {
writerBuilder.registerWriteHandler(BeanUtils.instantiateClass(clazz));
}
for (Class<? extends WriteHandler> clazz : responseExcel.writeHandler()) {
writerBuilder.registerWriteHandler(BeanUtils.instantiateClass(clazz));
}

// 开启国际化头信息处理
Expand All @@ -136,10 +134,8 @@ public ExcelWriter getExcelWriter(HttpServletResponse response, ResponseExcel re
// 自定义注入的转换器
registerCustomConverter(writerBuilder);

if (responseExcel.converter().length != 0) {
for (Class<? extends Converter> clazz : responseExcel.converter()) {
writerBuilder.registerConverter(BeanUtils.instantiateClass(clazz));
}
for (Class<? extends Converter> clazz : responseExcel.converter()) {
writerBuilder.registerConverter(BeanUtils.instantiateClass(clazz));
}

String templatePath = configProperties.getTemplatePath();
Expand Down

0 comments on commit d2f5bfc

Please sign in to comment.