转自:https://blog.csdn.net/mate_ge/article/details/93518286?utm_source=distribute.pc_relevant.none-task 今天在实现响应输出流下载模板文件时,虽然功能正常,但是后台一直报错: org.springframework.web.HttpMediaTypeNotAcceptableException: Could not find acceptable representation 截图 在导出excel
最近发现我们系统导出excel文件时由于是导出百万级数据导出,速度过慢并且内存占用多,故进行了下面的一次优化. 我们使用apache的poi进行excel文件操作 主要耗时: 1.从数据库得到需要导出的结果集耗时 2.将数据写入excel耗时 优化前 public abstract class BaseExcelOutputVo { public BaseExcelOutputVo() { } public abstract String[] toExcelHeaders(); public a