Skip to content

Commit

Permalink
🔥 移除自定义的Java 8日期字符串转换器
Browse files Browse the repository at this point in the history
  • Loading branch information
721806280 authored and Hccake committed Jul 4, 2024
1 parent 6cd5790 commit d5cef6c
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 195 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.ballcat.easyexcel.annotation.RequestExcel;
import org.ballcat.easyexcel.converters.LocalDateStringConverter;
import org.ballcat.easyexcel.converters.LocalDateTimeStringConverter;
import org.ballcat.easyexcel.handler.ListAnalysisEventListener;
import org.springframework.beans.BeanUtils;
import org.springframework.core.LocalVariableTableParameterNameDiscoverer;
Expand Down Expand Up @@ -113,8 +111,6 @@ public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer m

// 这里需要指定读用哪个 class 去读,然后读取第一个 sheet 文件流会自动关闭
EasyExcel.read(inputStream, excelModelClass, readListener)
.registerConverter(LocalDateStringConverter.INSTANCE)
.registerConverter(LocalDateTimeStringConverter.INSTANCE)
.ignoreEmptyRow(requestExcel.ignoreEmptyRow())
.sheet(sheetName)
.headRowNumber(requestExcel.headRowNumber())
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@
import org.ballcat.easyexcel.annotation.ResponseExcel;
import org.ballcat.easyexcel.aop.DynamicNameAspect;
import org.ballcat.easyexcel.config.ExcelConfigProperties;
import org.ballcat.easyexcel.converters.LocalDateStringConverter;
import org.ballcat.easyexcel.converters.LocalDateTimeStringConverter;
import org.ballcat.easyexcel.domain.SheetBuildProperties;
import org.ballcat.easyexcel.enhance.WriterBuilderEnhancer;
import org.ballcat.easyexcel.head.HeadGenerator;
Expand Down Expand Up @@ -125,8 +123,6 @@ public void export(Object o, HttpServletResponse response, ResponseExcel respons
@SneakyThrows(IOException.class)
public ExcelWriter getExcelWriter(HttpServletResponse response, ResponseExcel responseExcel) {
ExcelWriterBuilder writerBuilder = EasyExcel.write(response.getOutputStream())
.registerConverter(LocalDateStringConverter.INSTANCE)
.registerConverter(LocalDateTimeStringConverter.INSTANCE)
.autoCloseStream(true)
.excelType(responseExcel.suffix())
.inMemory(responseExcel.inMemory());
Expand Down

0 comments on commit d5cef6c

Please sign in to comment.