poi3.8大数据量Excel导出连续查询导出不同的报表后导出速度非常慢
  poi3.8用((SXSSFSheet)sheet).flushRows()方法解决了大数据量的excel导出,但是我在使用过程中,由于每个单元格都要设置不同的颜色和数据格式,发现导出第一张报表时速度还勉强可以接受,但是继续导出另一张报表,速度就慢的跟蜗牛似的,要10分钟甚至3个小时,请问有什么方法可以解决?
        代码如下:

private static void fillExcel(KDTable kdtReport, SXSSFWorkbook book, Sheet sheet) {
int headRowCount = kdtReport.getHeadRowCount();
headRowCount=headRowCount+startRowCount;
Font font=book.createFont();
font.setFontHeightInPoints((short)10);
//改为保留整数
Short numFormat = book.createDataFormat().getFormat("0"); //numFormat==>0.00=0
//单元格样式或行样式
CellStyle cellStyle = book.createCellStyle(); // 建立新的cell样式
cellStyle.setBorderBottom(CellStyle.BORDER_THIN); //下边框

cellStyle.setBorderLeft(CellStyle.BORDER_THIN);//左边框

cellStyle.setBorderTop(CellStyle.BORDER_THIN);//上边框

cellStyle.setBorderRight(CellStyle.BORDER_THIN);//右边框

Set mergeBlockSet = new HashSet();

Cell cell = null;
Object value = null;
KDTMergeBlock mergeBlock = null;
IRow row2 = null;
Color color = null;
Row row = null;
int treeLevel = 0;
short colorIndex = IndexedColors.WHITE.getIndex();
for (int i = 0; i < kdtReport.getRowCount(); i++) {

row2 = kdtReport.getRow(i);
treeLevel = row2.getTreeLevel();
color = row2.getStyleAttributes().getBackground();
row = sheet.getRow(i + headRowCount);
if(row==null){
row = sheet.createRow(i+headRowCount);
}

cellStyle = book.createCellStyle();
cellStyle.setBorderBottom(CellStyle.BORDER_THIN); //下边框

cellStyle.setBorderLeft(CellStyle.BORDER_THIN);//左边框

cellStyle.setBorderTop(CellStyle.BORDER_THIN);//上边框

cellStyle.setBorderRight(CellStyle.BORDER_THIN);//右边框

cellStyle.setFillPattern(CellStyle.SOLID_FOREGROUND);

        if(Color.white.getRed()==color.getRed()&&Color.white.getGreen()==color.getGreen()&&Color.white.getBlue()==color.getBlue()){
            colorIndex = IndexedColors.WHITE.getIndex();
        }else{
            colorIndex = spaceColorIndex[treeLevel];
        }
        cellStyle.setFillPattern(CellStyle.SOLID_FOREGROUND);
        cellStyle.setFillForegroundColor(colorIndex);
        for (int j = 0; j < kdtReport.getColumnCount(); j++) {
            value = row2.getCell(j).getValue();                 
            mergeBlock = row2.getCell(j).getMergeBlock();
            if(mergeBlock!=null){
                mergeBlockSet.add(mergeBlock);
            }
            if (value != null) {
                if(KDTableUtil.TREE_LEVEL_COLKEY.equals(kdtReport.getColumn(j).getKey()) || "curProject".equals(kdtReport.getColumn(j).getKey())){
                    if(!RptHelper.IndexHistoryChangeUIName.equals(tableName)){//指标历史变化表(这个好特殊啊)
                        value = value.toString().trim();
                        value = space1[treeLevel]+value;
                    }
                }                   
                cell = row.createCell(j);
                if(value instanceof BigDecimal || value instanceof Integer || value instanceof Long || value instanceof Double){
                    BigDecimal bValue = FDCHelper.toBigDecimal(value);
                    if(bValue.compareTo(BigDecimal.ZERO)!=0){
                        cell.setCellValue(bValue.doubleValue());
                        cell.setCellType(XSSFCell.CELL_TYPE_NUMERIC);
                    }
                    cellStyle.setDataFormat(numFormat);                     
                    cell.setCellStyle(cellStyle);
                }else{
                    cell.setCellValue(value.toString());
                    cell.setCellType(XSSFCell.CELL_TYPE_STRING);    
                    if(cellStyle!=null){
                        cell.setCellStyle(cellStyle);
                    }else{
                        cellStyle = book.createCellStyle();

                        cell.setCellStyle(cellStyle);
                    }
                }
            }else{                  
                cell = row.createCell(j);   
                cellStyle.setFillForegroundColor(colorIndex);
                cell.setCellStyle(cellStyle);
            }   
        }               
        //每100行,就设置分组和合并信息,最后把这100行内容从内存写入本地硬盘
         if(i>1&&i%100==0){
             System.out.println("i:"+i);
             try {
                // 设置分组和合并
                setRowGroup(kdtReport, sheet);
                // 设置分组数据显示
                sheet.setRowSumsBelow(false);
                sheet.setRowSumsRight(false);
                //这100行内容从内存写入本地硬盘
                ((SXSSFSheet)sheet).flushRows();
                cellStyle = book.createCellStyle();
              } catch (IOException e) {                 
                e.printStackTrace();
              }

          }
    }
    //把剩余行内容从内存写入本地硬盘
    try {
        // 设置分组和合并
        setRowGroup(kdtReport, sheet);
        // 设置分组数据显示
        sheet.setRowSumsBelow(false);
        sheet.setRowSumsRight(false);
        ((SXSSFSheet)sheet).flushRows();
        cellStyle = null;
    } catch (IOException e) {           
        e.printStackTrace();
    }
    Iterator iterator = mergeBlockSet.iterator();
    CellRangeAddress cellRangeAddress =null;
    while (iterator.hasNext()) {
        mergeBlock = (KDTMergeBlock) iterator.next();

        int left = mergeBlock.getLeft();
        int right = mergeBlock.getRight();

        int top=mergeBlock.getTop()+headRowCount;
        int bottom=mergeBlock.getBottom()+headRowCount; 

        cellRangeAddress = new CellRangeAddress(top, bottom, left, right);
        sheet.addMergedRegion(cellRangeAddress);
    }
}

1个回答

用性能监视工具看看内存有没有明显增加,代码的热区在哪里,看看能不能优化。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
poi 3.8 导出excel 乱码
在weblogic服务器下,用poi3.8导出数据成excel,中文数据全部都是乱码
POI3.9导出Excel出现乱码
POI3.9版本,导出Excel,出现中文乱码,输出流设置为response.setCharachtEncoding("utf-8"),创建单元格的时候设置了cell.setCellType(HSSFCell.ENCODING_UTF_16);每一个单元格内容还转换了new String(str.getBytes("UTF-8"), "UTF-8"); tomcat编码格式设置了URIEncoding="UTF-8" jsp页面也设置了编码格式utf-8 开发平台是UAP,UAP对Eclipse进行了包装, 上面的方法都试了,有时候就不乱吗,有时候就乱码,刚开始导出七八次不乱码,超过以后就乱码了。这个问题怎么解决?
poi3.1解析excel的问题
FileInputStream fis = new FileInputStream(file); //file为上传文件的路径 HSSFWorkbook wb = new HSSFWorkbook(new POIFSFileSystem(fis)); //报错行 错误信息 org.apache.poi.hssf.record.RecordFormatException: Unable to construct record instance at org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:191) at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:115) at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:205) at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:257) at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:238) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:179) ... 94 more Caused by: java.lang.ArrayIndexOutOfBoundsException at org.apache.poi.hssf.record.RecordInputStream.checkRecordPosition(RecordInputStream.java:132) at org.apache.poi.hssf.record.RecordInputStream.readByte(RecordInputStream.java:137) at org.apache.poi.hssf.record.HeaderRecord.fillFields(HeaderRecord.java:76) at org.apache.poi.hssf.record.Record.<init>(Record.java:56) at org.apache.poi.hssf.record.HeaderRecord.<init>(HeaderRecord.java:58) ... 99 more
如何解决poi3.6版本导出excel中文乱码问题
poi使用版本3.6,在进行导出中文后会出现乱码问题。 查阅了一些资料,发现在3.0后似乎去掉了setEncoding方法,请问如果坚持使用3.6版本如何解决中文乱码问题。 坚持使用原因的是项目中有很多地方使用了3.6的个别方法。谢谢
poi刷新公式报错class org.apache.poi.ss.formula.eval.MissingArgEval
XSSFFormulaEvaluator.evaluateAllFormulaCells(wb); 使用poi读取excel,刷新公式时报错如下,请教如何解决 java.lang.RuntimeException: Invalid ValueEval type passed for conversion: (class org.apache.poi.ss.formula.eval.MissingArgEval) at org.apache.poi.ss.formula.functions.MultiOperandNumericFunction.collectValue(MultiOperandNumericFunction.java:219) at org.apache.poi.ss.formula.functions.MultiOperandNumericFunction.collectValues(MultiOperandNumericFunction.java:179) at org.apache.poi.ss.formula.functions.MultiOperandNumericFunction.getNumberArray(MultiOperandNumericFunction.java:128) at org.apache.poi.ss.formula.functions.MultiOperandNumericFunction.evaluate(MultiOperandNumericFunction.java:90) at org.apache.poi.ss.formula.OperationEvaluatorFactory.evaluate(OperationEvaluatorFactory.java:132) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:503) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:263) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateReference(WorkbookEvaluator.java:702) at org.apache.poi.ss.formula.SheetRefEvaluator.getEvalForCell(SheetRefEvaluator.java:48) at org.apache.poi.ss.formula.SheetRangeEvaluator.getEvalForCell(SheetRangeEvaluator.java:74) at org.apache.poi.ss.formula.LazyRefEval.getInnerValueEval(LazyRefEval.java:43) at org.apache.poi.ss.formula.eval.OperandResolver.chooseSingleElementFromRef(OperandResolver.java:179) at org.apache.poi.ss.formula.eval.OperandResolver.getSingleValue(OperandResolver.java:62) at org.apache.poi.ss.formula.eval.TwoOperandNumericOperation.singleOperandEvaluate(TwoOperandNumericOperation.java:29) at org.apache.poi.ss.formula.eval.TwoOperandNumericOperation.evaluate(TwoOperandNumericOperation.java:35) at org.apache.poi.ss.formula.functions.Fixed2ArgFunction.evaluate(Fixed2ArgFunction.java:33) at org.apache.poi.ss.formula.OperationEvaluatorFactory.evaluate(OperationEvaluatorFactory.java:119) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:503) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:263) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateReference(WorkbookEvaluator.java:702) at org.apache.poi.ss.formula.SheetRefEvaluator.getEvalForCell(SheetRefEvaluator.java:48) at org.apache.poi.ss.formula.SheetRangeEvaluator.getEvalForCell(SheetRangeEvaluator.java:74) at org.apache.poi.ss.formula.LazyRefEval.getInnerValueEval(LazyRefEval.java:43) at org.apache.poi.ss.formula.eval.OperandResolver.chooseSingleElementFromRef(OperandResolver.java:179) at org.apache.poi.ss.formula.eval.OperandResolver.getSingleValue(OperandResolver.java:62) at org.apache.poi.ss.formula.eval.TwoOperandNumericOperation.singleOperandEvaluate(TwoOperandNumericOperation.java:29) at org.apache.poi.ss.formula.eval.TwoOperandNumericOperation.evaluate(TwoOperandNumericOperation.java:35) at org.apache.poi.ss.formula.functions.Fixed2ArgFunction.evaluate(Fixed2ArgFunction.java:33) at org.apache.poi.ss.formula.OperationEvaluatorFactory.evaluate(OperationEvaluatorFactory.java:119) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:503) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:263) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateReference(WorkbookEvaluator.java:702) at org.apache.poi.ss.formula.SheetRefEvaluator.getEvalForCell(SheetRefEvaluator.java:48) at org.apache.poi.ss.formula.SheetRangeEvaluator.getEvalForCell(SheetRangeEvaluator.java:74) at org.apache.poi.ss.formula.LazyRefEval.getInnerValueEval(LazyRefEval.java:43) at org.apache.poi.ss.formula.eval.OperandResolver.chooseSingleElementFromRef(OperandResolver.java:179) at org.apache.poi.ss.formula.eval.OperandResolver.getSingleValue(OperandResolver.java:62) at org.apache.poi.ss.formula.eval.TwoOperandNumericOperation.singleOperandEvaluate(TwoOperandNumericOperation.java:29) at org.apache.poi.ss.formula.eval.TwoOperandNumericOperation.evaluate(TwoOperandNumericOperation.java:35) at org.apache.poi.ss.formula.functions.Fixed2ArgFunction.evaluate(Fixed2ArgFunction.java:33) at org.apache.poi.ss.formula.OperationEvaluatorFactory.evaluate(OperationEvaluatorFactory.java:119) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:503) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:263) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateReference(WorkbookEvaluator.java:702) at org.apache.poi.ss.formula.SheetRefEvaluator.getEvalForCell(SheetRefEvaluator.java:48) at org.apache.poi.ss.formula.SheetRangeEvaluator.getEvalForCell(SheetRangeEvaluator.java:74) at org.apache.poi.ss.formula.LazyRefEval.getInnerValueEval(LazyRefEval.java:43) at org.apache.poi.ss.formula.eval.OperandResolver.chooseSingleElementFromRef(OperandResolver.java:179) at org.apache.poi.ss.formula.eval.OperandResolver.getSingleValue(OperandResolver.java:62) at org.apache.poi.ss.formula.WorkbookEvaluator.dereferenceResult(WorkbookEvaluator.java:570) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:521) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:263) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateReference(WorkbookEvaluator.java:702) at org.apache.poi.ss.formula.SheetRefEvaluator.getEvalForCell(SheetRefEvaluator.java:48) at org.apache.poi.ss.formula.SheetRangeEvaluator.getEvalForCell(SheetRangeEvaluator.java:74) at org.apache.poi.ss.formula.LazyRefEval.getInnerValueEval(LazyRefEval.java:43) at org.apache.poi.ss.formula.eval.OperandResolver.chooseSingleElementFromRef(OperandResolver.java:179) at org.apache.poi.ss.formula.eval.OperandResolver.getSingleValue(OperandResolver.java:62) at org.apache.poi.ss.formula.eval.TwoOperandNumericOperation.singleOperandEvaluate(TwoOperandNumericOperation.java:29) at org.apache.poi.ss.formula.eval.TwoOperandNumericOperation.evaluate(TwoOperandNumericOperation.java:35) at org.apache.poi.ss.formula.functions.Fixed2ArgFunction.evaluate(Fixed2ArgFunction.java:33) at org.apache.poi.ss.formula.OperationEvaluatorFactory.evaluate(OperationEvaluatorFactory.java:119) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:503) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:263) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateReference(WorkbookEvaluator.java:702) at org.apache.poi.ss.formula.SheetRefEvaluator.getEvalForCell(SheetRefEvaluator.java:48) at org.apache.poi.ss.formula.SheetRangeEvaluator.getEvalForCell(SheetRangeEvaluator.java:74) at org.apache.poi.ss.formula.LazyRefEval.getInnerValueEval(LazyRefEval.java:43) at org.apache.poi.ss.formula.eval.OperandResolver.chooseSingleElementFromRef(OperandResolver.java:179) at org.apache.poi.ss.formula.eval.OperandResolver.getSingleValue(OperandResolver.java:62) at org.apache.poi.ss.formula.WorkbookEvaluator.dereferenceResult(WorkbookEvaluator.java:570) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:521) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:263) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateReference(WorkbookEvaluator.java:702) at org.apache.poi.ss.formula.SheetRefEvaluator.getEvalForCell(SheetRefEvaluator.java:48) at org.apache.poi.ss.formula.SheetRangeEvaluator.getEvalForCell(SheetRangeEvaluator.java:74) at org.apache.poi.ss.formula.LazyRefEval.getInnerValueEval(LazyRefEval.java:43) at org.apache.poi.ss.formula.eval.OperandResolver.chooseSingleElementFromRef(OperandResolver.java:179) at org.apache.poi.ss.formula.eval.OperandResolver.getSingleValue(OperandResolver.java:62) at org.apache.poi.ss.formula.WorkbookEvaluator.dereferenceResult(WorkbookEvaluator.java:570) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:521) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:263) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateReference(WorkbookEvaluator.java:702) at org.apache.poi.ss.formula.SheetRefEvaluator.getEvalForCell(SheetRefEvaluator.java:48) at org.apache.poi.ss.formula.SheetRangeEvaluator.getEvalForCell(SheetRangeEvaluator.java:74) at org.apache.poi.ss.formula.LazyRefEval.getInnerValueEval(LazyRefEval.java:43) at org.apache.poi.ss.formula.eval.OperandResolver.chooseSingleElementFromRef(OperandResolver.java:179) at org.apache.poi.ss.formula.eval.OperandResolver.getSingleValue(OperandResolver.java:62) at org.apache.poi.ss.formula.eval.TwoOperandNumericOperation.singleOperandEvaluate(TwoOperandNumericOperation.java:29) at org.apache.poi.ss.formula.eval.TwoOperandNumericOperation.evaluate(TwoOperandNumericOperation.java:35) at org.apache.poi.ss.formula.functions.Fixed2ArgFunction.evaluate(Fixed2ArgFunction.java:33) at org.apache.poi.ss.formula.OperationEvaluatorFactory.evaluate(OperationEvaluatorFactory.java:119) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:503) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:263) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateReference(WorkbookEvaluator.java:702) at org.apache.poi.ss.formula.SheetRefEvaluator.getEvalForCell(SheetRefEvaluator.java:48) at org.apache.poi.ss.formula.SheetRangeEvaluator.getEvalForCell(SheetRangeEvaluator.java:74) at org.apache.poi.ss.formula.LazyAreaEval.getRelativeValue(LazyAreaEval.java:51) at org.apache.poi.ss.formula.LazyAreaEval.getRelativeValue(LazyAreaEval.java:45) at org.apache.poi.ss.formula.eval.AreaEvalBase.getValue(AreaEvalBase.java:128) at org.apache.poi.ss.formula.functions.Sumproduct.evaluateAreaSumProduct(Sumproduct.java:157) at org.apache.poi.ss.formula.functions.Sumproduct.evaluate(Sumproduct.java:77) at org.apache.poi.ss.formula.OperationEvaluatorFactory.evaluate(OperationEvaluatorFactory.java:132) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:503) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:263) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateReference(WorkbookEvaluator.java:702) at org.apache.poi.ss.formula.SheetRefEvaluator.getEvalForCell(SheetRefEvaluator.java:48) at org.apache.poi.ss.formula.SheetRangeEvaluator.getEvalForCell(SheetRangeEvaluator.java:74) at org.apache.poi.ss.formula.LazyRefEval.getInnerValueEval(LazyRefEval.java:43) at org.apache.poi.ss.formula.eval.OperandResolver.chooseSingleElementFromRef(OperandResolver.java:179) at org.apache.poi.ss.formula.eval.OperandResolver.getSingleValue(OperandResolver.java:62) at org.apache.poi.ss.formula.WorkbookEvaluator.dereferenceResult(WorkbookEvaluator.java:570) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:521) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:263) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateReference(WorkbookEvaluator.java:702) at org.apache.poi.ss.formula.SheetRefEvaluator.getEvalForCell(SheetRefEvaluator.java:48) at org.apache.poi.ss.formula.SheetRangeEvaluator.getEvalForCell(SheetRangeEvaluator.java:74) at org.apache.poi.ss.formula.LazyRefEval.getInnerValueEval(LazyRefEval.java:43) at org.apache.poi.ss.formula.eval.OperandResolver.chooseSingleElementFromRef(OperandResolver.java:179) at org.apache.poi.ss.formula.eval.OperandResolver.getSingleValue(OperandResolver.java:62) at org.apache.poi.ss.formula.eval.TwoOperandNumericOperation.singleOperandEvaluate(TwoOperandNumericOperation.java:29) at org.apache.poi.ss.formula.eval.TwoOperandNumericOperation.evaluate(TwoOperandNumericOperation.java:35) at org.apache.poi.ss.formula.functions.Fixed2ArgFunction.evaluate(Fixed2ArgFunction.java:33) at org.apache.poi.ss.formula.OperationEvaluatorFactory.evaluate(OperationEvaluatorFactory.java:119) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:503) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:263) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateReference(WorkbookEvaluator.java:702) at org.apache.poi.ss.formula.SheetRefEvaluator.getEvalForCell(SheetRefEvaluator.java:48) at org.apache.poi.ss.formula.SheetRangeEvaluator.getEvalForCell(SheetRangeEvaluator.java:74) at org.apache.poi.ss.formula.LazyRefEval.getInnerValueEval(LazyRefEval.java:43) at org.apache.poi.ss.formula.eval.OperandResolver.chooseSingleElementFromRef(OperandResolver.java:179) at org.apache.poi.ss.formula.eval.OperandResolver.getSingleValue(OperandResolver.java:62) at org.apache.poi.ss.formula.WorkbookEvaluator.dereferenceResult(WorkbookEvaluator.java:570) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:521) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:263) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateReference(WorkbookEvaluator.java:702) at org.apache.poi.ss.formula.SheetRefEvaluator.getEvalForCell(SheetRefEvaluator.java:48) at org.apache.poi.ss.formula.SheetRangeEvaluator.getEvalForCell(SheetRangeEvaluator.java:74) at org.apache.poi.ss.formula.LazyAreaEval.getRelativeValue(LazyAreaEval.java:51) at org.apache.poi.ss.formula.LazyAreaEval.getRelativeValue(LazyAreaEval.java:45) at org.apache.poi.ss.formula.eval.AreaEvalBase.getValue(AreaEvalBase.java:128) at org.apache.poi.ss.formula.functions.Sumproduct.evaluateAreaSumProduct(Sumproduct.java:157) at org.apache.poi.ss.formula.functions.Sumproduct.evaluate(Sumproduct.java:77) at org.apache.poi.ss.formula.OperationEvaluatorFactory.evaluate(OperationEvaluatorFactory.java:132) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:503) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:263) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateReference(WorkbookEvaluator.java:702) at org.apache.poi.ss.formula.SheetRefEvaluator.getEvalForCell(SheetRefEvaluator.java:48) at org.apache.poi.ss.formula.SheetRangeEvaluator.getEvalForCell(SheetRangeEvaluator.java:74) at org.apache.poi.ss.formula.LazyRefEval.getInnerValueEval(LazyRefEval.java:43) at org.apache.poi.ss.formula.eval.OperandResolver.chooseSingleElementFromRef(OperandResolver.java:179) at org.apache.poi.ss.formula.eval.OperandResolver.getSingleValue(OperandResolver.java:62) at org.apache.poi.ss.formula.WorkbookEvaluator.dereferenceResult(WorkbookEvaluator.java:570) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:521) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:263) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateReference(WorkbookEvaluator.java:702) at org.apache.poi.ss.formula.SheetRefEvaluator.getEvalForCell(SheetRefEvaluator.java:48) at org.apache.poi.ss.formula.SheetRangeEvaluator.getEvalForCell(SheetRangeEvaluator.java:74) at org.apache.poi.ss.formula.LazyRefEval.getInnerValueEval(LazyRefEval.java:43) at org.apache.poi.ss.formula.eval.OperandResolver.chooseSingleElementFromRef(OperandResolver.java:179) at org.apache.poi.ss.formula.eval.OperandResolver.getSingleValue(OperandResolver.java:62) at org.apache.poi.ss.formula.WorkbookEvaluator.dereferenceResult(WorkbookEvaluator.java:570) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:521) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:263) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluate(WorkbookEvaluator.java:205) at org.apache.poi.xssf.usermodel.BaseXSSFFormulaEvaluator.evaluateFormulaCellValue(BaseXSSFFormulaEvaluator.java:189) at org.apache.poi.xssf.usermodel.BaseXSSFFormulaEvaluator.evaluateFormulaCell(BaseXSSFFormulaEvaluator.java:117) at org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator.evaluateAllFormulaCells(HSSFFormulaEvaluator.java:346) at org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator.evaluateAllFormulaCells(HSSFFormulaEvaluator.java:337) at org.apache.poi.xssf.usermodel.XSSFFormulaEvaluator.evaluateAllFormulaCells(XSSFFormulaEvaluator.java:91) at com.sinosoft.service.pressure.impl.PressureServiceImpl.pressureCalculateTO(PressureServiceImpl.java:1530) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208) at com.sun.proxy.$Proxy604.pressureCalculateTO(Unknown Source) at com.sinosoft.controller.pressure.PressureController.pressureCalculateTO(PressureController.java:438) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:222) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:814) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:737) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872) at javax.servlet.http.HttpServlet.service(HttpServlet.java:650) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449) at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365) at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383) at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362) at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:121) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Unknown Source)
JAVA导出Excel时,可以正常导出,但是后端控制台报错JsonMappingException
JAVA导出Excel时,可以正常导出,但是后端控制台报错JsonMappingException 具体报错代码如下 ``` 2019-11-29 10:24:49.693 ERROR [http-nio-9040-exec-3] [CommonResponseWrappedMsgFormater.java : 104] - 请求服务响应数据序列化输出异常: com.fasterxml.jackson.databind.JsonMappingException: No serializer found for class java.io.ByteArrayInputStream and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: com.xmcares.framework.common.response.CommonResponse["data"]->org.apache.poi.xssf.usermodel.XSSFWorkbook["packagePart"]->org.apache.poi.openxml4j.opc.ZipPackagePart["zipArchive"]->org.apache.poi.openxml4j.util.ZipInputStreamZipEntrySource$FakeZipEntry["inputStream"]) at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:284) ~[jackson-databind-2.8.8.jar:2.8.8] at com.fasterxml.jackson.databind.SerializerProvider.mappingException(SerializerProvider.java:1110) ~[jackson-databind-2.8.8.jar:2.8.8] at com.fasterxml.jackson.databind.SerializerProvider.reportMappingProblem(SerializerProvider.java:1135) ~[jackson-databind-2.8.8.jar:2.8.8] at com.fasterxml.jackson.databind.ser.impl.UnknownSerializer.failForEmpty(UnknownSerializer.java:69) ~[jackson-databind-2.8.8.jar:2.8.8] at com.fasterxml.jackson.databind.ser.impl.UnknownSerializer.serialize(UnknownSerializer.java:32) ~[jackson-databind-2.8.8.jar:2.8.8] at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:704) ~[jackson-databind-2.8.8.jar:2.8.8] at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:690) ~[jackson-databind-2.8.8.jar:2.8.8] at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:155) ~[jackson-databind-2.8.8.jar:2.8.8] at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:704) ~[jackson-databind-2.8.8.jar:2.8.8] at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:690) ~[jackson-databind-2.8.8.jar:2.8.8] at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:155) ~[jackson-databind-2.8.8.jar:2.8.8] at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:704) ~[jackson-databind-2.8.8.jar:2.8.8] at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:690) ~[jackson-databind-2.8.8.jar:2.8.8] at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:155) ~[jackson-databind-2.8.8.jar:2.8.8] at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:704) ~[jackson-databind-2.8.8.jar:2.8.8] at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:690) ~[jackson-databind-2.8.8.jar:2.8.8] at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:155) ~[jackson-databind-2.8.8.jar:2.8.8] at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:292) ~[jackson-databind-2.8.8.jar:2.8.8] at com.fasterxml.jackson.databind.ObjectMapper._configAndWriteValue(ObjectMapper.java:3681) ~[jackson-databind-2.8.8.jar:2.8.8] at com.fasterxml.jackson.databind.ObjectMapper.writeValue(ObjectMapper.java:3014) ~[jackson-databind-2.8.8.jar:2.8.8] at com.xmcares.framework.serviceful.servlet.fomater.CommonResponseWrappedMsgFormater.formatMsgInternal(CommonResponseWrappedMsgFormater.java:102) [xcf-foundation-security-2.7.0.7-20191111.084436-3.jar:2.7.0.7-SNAPSHOT] at com.xmcares.framework.serviceful.servlet.fomater.CommonResponseWrappedMsgFormater.formatMsg(CommonResponseWrappedMsgFormater.java:69) [xcf-foundation-security-2.7.0.7-20191111.084436-3.jar:2.7.0.7-SNAPSHOT] at com.xmcares.framework.serviceful.servlet.ServletServiceResponseMarshaller.marshaller(ServletServiceResponseMarshaller.java:34) [xcf-foundation-security-2.7.0.7-20191111.084436-3.jar:2.7.0.7-SNAPSHOT] at com.xmcares.framework.serviceful.servlet.ServletServiceResponseMarshaller.marshaller(ServletServiceResponseMarshaller.java:24) [xcf-foundation-security-2.7.0.7-20191111.084436-3.jar:2.7.0.7-SNAPSHOT] at com.xmcares.framework.serviceful.ServicefulRouterAdapter.marshallerServiceResponse(ServicefulRouterAdapter.java:204) [xcf-foundation-security-2.7.0.7-20191111.084436-3.jar:2.7.0.7-SNAPSHOT] at com.xmcares.framework.serviceful.ServicefulRouterAdapter.route(ServicefulRouterAdapter.java:110) [xcf-foundation-security-2.7.0.7-20191111.084436-3.jar:2.7.0.7-SNAPSHOT] at com.xmcares.framework.serviceful.servlet.ServletServicefulRouter.route(ServletServicefulRouter.java:42) [xcf-foundation-security-2.7.0.7-20191111.084436-3.jar:2.7.0.7-SNAPSHOT] at com.xmcares.framework.serviceful.servlet.ServicefulServlet.doService(ServicefulServlet.java:112) [xcf-foundation-security-2.7.0.7-20191111.084436-3.jar:2.7.0.7-SNAPSHOT] at com.xmcares.framework.serviceful.servlet.AbstractHttpServlet.doPost(AbstractHttpServlet.java:55) [xcf-foundation-security-2.7.0.7-20191111.084436-3.jar:2.7.0.7-SNAPSHOT] at javax.servlet.http.HttpServlet.service(HttpServlet.java:661) [tomcat-embed-core-8.5.13.jar:8.5.13] at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-embed-websocket-8.5.13.jar:8.5.13] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.springframework.boot.web.filter.ApplicationContextHeaderFilter.doFilterInternal(ApplicationContextHeaderFilter.java:55) [spring-boot-1.4.6.RELEASE.jar:1.4.6.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101) [spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.13.jar:8.5.13] at com.xmcares.framework.security.author.UserContextHolderFilter.doFilter(UserContextHolderFilter.java:43) [xcf-foundation-security-2.7.0.7-20191111.084436-3.jar:2.7.0.7-SNAPSHOT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.13.jar:8.5.13] at com.xmcares.framework.security.authen.AuthenticationPageFilter.doFilter(AuthenticationPageFilter.java:54) [xcf-foundation-security-2.7.0.7-20191111.084436-3.jar:2.7.0.7-SNAPSHOT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101) [spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:105) [spring-boot-actuator-1.4.6.RELEASE.jar:1.4.6.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at com.xmcares.framework.security.authen.AuthenticationPageFilter.doFilter(AuthenticationPageFilter.java:54) [xcf-foundation-security-2.7.0.7-20191111.084436-3.jar:2.7.0.7-SNAPSHOT] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at com.xmcares.framework.security.authen.CaptchaRequestFilter.doFilter(CaptchaRequestFilter.java:50) [xcf-foundation-security-2.7.0.7-20191111.084436-3.jar:2.7.0.7-SNAPSHOT] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:96) [spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at com.xmcares.framework.security.author.UserContextHolderFilter.doFilter(UserContextHolderFilter.java:57) [xcf-foundation-security-2.7.0.7-20191111.084436-3.jar:2.7.0.7-SNAPSHOT] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) [spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) [spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE] at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262) [spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:105) [spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81) [spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.springframework.session.web.http.SessionRepositoryFilter.doFilterInternal(SessionRepositoryFilter.java:167) [spring-session-1.3.1.RELEASE.jar:na] at org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:80) [spring-session-1.3.1.RELEASE.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) [spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:106) [spring-boot-actuator-1.4.6.RELEASE.jar:1.4.6.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:341) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-8.5.13.jar:8.5.13] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_191] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_191] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.5.13.jar:8.5.13] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_191] 2019-11-29 10:24:49.703 ERROR [http-nio-9040-exec-3] [ServicefulServlet.java : 114] - 服务化路由器执行请求/sysUser/downloadTemplate异常 com.xmcares.framework.serviceful.error.ServicefulException: 请求服务响应数据序列化输出异常 at com.xmcares.framework.serviceful.servlet.fomater.CommonResponseWrappedMsgFormater.formatMsgInternal(CommonResponseWrappedMsgFormater.java:105) ~[xcf-foundation-security-2.7.0.7-20191111.084436-3.jar:2.7.0.7-SNAPSHOT] at com.xmcares.framework.serviceful.servlet.fomater.CommonResponseWrappedMsgFormater.formatMsg(CommonResponseWrappedMsgFormater.java:69) ~[xcf-foundation-security-2.7.0.7-20191111.084436-3.jar:2.7.0.7-SNAPSHOT] at com.xmcares.framework.serviceful.servlet.ServletServiceResponseMarshaller.marshaller(ServletServiceResponseMarshaller.java:34) ~[xcf-foundation-security-2.7.0.7-20191111.084436-3.jar:2.7.0.7-SNAPSHOT] at com.xmcares.framework.serviceful.servlet.ServletServiceResponseMarshaller.marshaller(ServletServiceResponseMarshaller.java:24) ~[xcf-foundation-security-2.7.0.7-20191111.084436-3.jar:2.7.0.7-SNAPSHOT] at com.xmcares.framework.serviceful.ServicefulRouterAdapter.marshallerServiceResponse(ServicefulRouterAdapter.java:204) ~[xcf-foundation-security-2.7.0.7-20191111.084436-3.jar:2.7.0.7-SNAPSHOT] at com.xmcares.framework.serviceful.ServicefulRouterAdapter.route(ServicefulRouterAdapter.java:110) ~[xcf-foundation-security-2.7.0.7-20191111.084436-3.jar:2.7.0.7-SNAPSHOT] at com.xmcares.framework.serviceful.servlet.ServletServicefulRouter.route(ServletServicefulRouter.java:42) ~[xcf-foundation-security-2.7.0.7-20191111.084436-3.jar:2.7.0.7-SNAPSHOT] at com.xmcares.framework.serviceful.servlet.ServicefulServlet.doService(ServicefulServlet.java:112) ~[xcf-foundation-security-2.7.0.7-20191111.084436-3.jar:2.7.0.7-SNAPSHOT] at com.xmcares.framework.serviceful.servlet.AbstractHttpServlet.doPost(AbstractHttpServlet.java:55) [xcf-foundation-security-2.7.0.7-20191111.084436-3.jar:2.7.0.7-SNAPSHOT] at javax.servlet.http.HttpServlet.service(HttpServlet.java:661) [tomcat-embed-core-8.5.13.jar:8.5.13] at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-embed-websocket-8.5.13.jar:8.5.13] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.springframework.boot.web.filter.ApplicationContextHeaderFilter.doFilterInternal(ApplicationContextHeaderFilter.java:55) [spring-boot-1.4.6.RELEASE.jar:1.4.6.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101) [spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.13.jar:8.5.13] at com.xmcares.framework.security.author.UserContextHolderFilter.doFilter(UserContextHolderFilter.java:43) [xcf-foundation-security-2.7.0.7-20191111.084436-3.jar:2.7.0.7-SNAPSHOT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.13.jar:8.5.13] at com.xmcares.framework.security.authen.AuthenticationPageFilter.doFilter(AuthenticationPageFilter.java:54) [xcf-foundation-security-2.7.0.7-20191111.084436-3.jar:2.7.0.7-SNAPSHOT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101) [spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:105) [spring-boot-actuator-1.4.6.RELEASE.jar:1.4.6.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at com.xmcares.framework.security.authen.AuthenticationPageFilter.doFilter(AuthenticationPageFilter.java:54) [xcf-foundation-security-2.7.0.7-20191111.084436-3.jar:2.7.0.7-SNAPSHOT] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at com.xmcares.framework.security.authen.CaptchaRequestFilter.doFilter(CaptchaRequestFilter.java:50) [xcf-foundation-security-2.7.0.7-20191111.084436-3.jar:2.7.0.7-SNAPSHOT] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:96) [spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at com.xmcares.framework.security.author.UserContextHolderFilter.doFilter(UserContextHolderFilter.java:57) [xcf-foundation-security-2.7.0.7-20191111.084436-3.jar:2.7.0.7-SNAPSHOT] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) [spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177) [spring-security-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) [spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE] at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262) [spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:105) [spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81) [spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.springframework.session.web.http.SessionRepositoryFilter.doFilterInternal(SessionRepositoryFilter.java:167) [spring-session-1.3.1.RELEASE.jar:na] at org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:80) [spring-session-1.3.1.RELEASE.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) [spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:106) [spring-boot-actuator-1.4.6.RELEASE.jar:1.4.6.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:341) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455) [tomcat-embed-core-8.5.13.jar:8.5.13] at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-8.5.13.jar:8.5.13] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_191] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_191] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.5.13.jar:8.5.13] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_191] Caused by: com.fasterxml.jackson.databind.JsonMappingException: No serializer found for class java.io.ByteArrayInputStream and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: com.xmcares.framework.common.response.CommonResponse["data"]->org.apache.poi.xssf.usermodel.XSSFWorkbook["packagePart"]->org.apache.poi.openxml4j.opc.ZipPackagePart["zipArchive"]->org.apache.poi.openxml4j.util.ZipInputStreamZipEntrySource$FakeZipEntry["inputStream"]) at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:284) ~[jackson-databind-2.8.8.jar:2.8.8] at com.fasterxml.jackson.databind.SerializerProvider.mappingException(SerializerProvider.java:1110) ~[jackson-databind-2.8.8.jar:2.8.8] at com.fasterxml.jackson.databind.SerializerProvider.reportMappingProblem(SerializerProvider.java:1135) ~[jackson-databind-2.8.8.jar:2.8.8] at com.fasterxml.jackson.databind.ser.impl.UnknownSerializer.failForEmpty(UnknownSerializer.java:69) ~[jackson-databind-2.8.8.jar:2.8.8] at com.fasterxml.jackson.databind.ser.impl.UnknownSerializer.serialize(UnknownSerializer.java:32) ~[jackson-databind-2.8.8.jar:2.8.8] at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:704) ~[jackson-databind-2.8.8.jar:2.8.8] at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:690) ~[jackson-databind-2.8.8.jar:2.8.8] at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:155) ~[jackson-databind-2.8.8.jar:2.8.8] at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:704) ~[jackson-databind-2.8.8.jar:2.8.8] at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:690) ~[jackson-databind-2.8.8.jar:2.8.8] at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:155) ~[jackson-databind-2.8.8.jar:2.8.8] at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:704) ~[jackson-databind-2.8.8.jar:2.8.8] at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:690) ~[jackson-databind-2.8.8.jar:2.8.8] at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:155) ~[jackson-databind-2.8.8.jar:2.8.8] at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:704) ~[jackson-databind-2.8.8.jar:2.8.8] at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:690) ~[jackson-databind-2.8.8.jar:2.8.8] at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:155) ~[jackson-databind-2.8.8.jar:2.8.8] at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:292) ~[jackson-databind-2.8.8.jar:2.8.8] at com.fasterxml.jackson.databind.ObjectMapper._configAndWriteValue(ObjectMapper.java:3681) ~[jackson-databind-2.8.8.jar:2.8.8] at com.fasterxml.jackson.databind.ObjectMapper.writeValue(ObjectMapper.java:3014) ~[jackson-databind-2.8.8.jar:2.8.8] at com.xmcares.framework.serviceful.servlet.fomater.CommonResponseWrappedMsgFormater.formatMsgInternal(CommonResponseWrappedMsgFormater.java:102) ~[xcf-foundation-security-2.7.0.7-20191111.084436-3.jar:2.7.0.7-SNAPSHOT] ... 118 common frames omitted ```
poi3.8导出excel new XSSFWorkbook(); 时有问题
<p><span style="font-size: small;">private void produceExcel(String sheetName,String[]titles,List resultList<br>   ,String[]mapKeys,String[]mapKeyTypes,String excelName,String QDFalg<br>   ,String txtSt,String city) throws IOException {<br>   try {<br>         Workbook wb = new  XSSFWorkbook(); <br>    Sheet sheet = createSheet(wb,sheetName);//创建表单<br>          buileHeadLine(sheet,titles,wb);//创建首行标题    <br>          buildCell(sheet,resultList,wb,mapKeys,mapKeyTypes);//根据数据List创建内容单元格 </span></p> <p><span style="font-size: small;"> </span></p> <p><span style="font-size: small;">运行到Workbook wb = new  XSSFWorkbook行是debug进去没报任何错</span></p> <p><span style="font-size: small;">进到了MultiActionController.class</span></p> <p> </p> <p><span style="font-size: small;">用了以下几个包 <br>   poi-3.8-beta5-20111217.jar <br>   poi-ooxml-3.8-beta5-20111217.jar <br>   xmlbeans-2.3.0.jar <br>   poi-ooxml-schemas-3.8-beta5-20111217.jar <br>   dom4j-1.6.1.jar </span></p>
java poi导出excel文档 后台报下标越界 但文档正常导出且损坏
public static SXSSFWorkbook createCSVUtil2(int startRow, String sheetName, SXSSFWorkbook wb, Map<String, List<CellModel>> cellListMap, Integer cellRowNum, List<LinkedHashMap> exportData, int[] columnWidth, int totalcolumn, GgreportingtemplateDto ggreportingtemplateDto, int countRow) throws Exception { // 设置表格名称 SXSSFSheet sheet = (SXSSFSheet) wb.createSheet(sheetName); sheet.trackAllColumnsForAutoSizing(); // 设置表格标题 一般都是第一行第一个格子 // 标题样式 if (ggreportingtemplateDto.getTitle() != null) { XSSFCellStyle cellStyleTitle = (XSSFCellStyle) wb.createCellStyle(); cellStyleTitle.setWrapText(true); SXSSFRow rowTitle = (SXSSFRow) sheet.createRow(0); XSSFFont fontTitle = (XSSFFont) wb.createFont(); fontTitle.setFontHeightInPoints((short) 16); cellStyleTitle.setFont(fontTitle); // 合并标题单元格 sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, totalcolumn - 1)); for (int i = 0; i < totalcolumn; i++) { if (i == 0) { SXSSFCell cell = (SXSSFCell) rowTitle.createCell(0); cell.setCellValue(ggreportingtemplateDto.getTitle()); cell.setCellStyle(cellStyleTitle); } else { SXSSFCell cell = (SXSSFCell) rowTitle.createCell(i); cell.setCellStyle(cellStyleTitle); } } } if (ggreportingtemplateDto.getCondition() != null) { // 设置筛选条件格子 一般是第二行第一列 // 条件样式 XSSFCellStyle cellStyleCondition = (XSSFCellStyle) wb.createCellStyle(); cellStyleCondition.setWrapText(true); SXSSFRow rowCondition = (SXSSFRow) sheet.createRow(1); XSSFFont fontCondition = (XSSFFont) wb.createFont(); fontCondition.setFontHeightInPoints((short) 16); cellStyleCondition.setFont(fontCondition); // 合并条件单元格 sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, 4)); for (int i = 0; i < 4; i++) { if (i == 0) { SXSSFCell cell = (SXSSFCell) rowCondition.createCell(0); cell.setCellValue(ggreportingtemplateDto.getCondition()); cell.setCellStyle(cellStyleCondition); } else { SXSSFCell cell = (SXSSFCell) rowCondition.createCell(i); cell.setCellStyle(cellStyleCondition); } } } // 设置表格通用样式 XSSFCellStyle cellStyle = (XSSFCellStyle) wb.createCellStyle(); // 设置边框 // 设置单元格内容水平对齐 cellStyle.setAlignment(XSSFCellStyle.ALIGN_CENTER); // 设置单元格内容垂直对齐 cellStyle.setVerticalAlignment(XSSFCellStyle.VERTICAL_CENTER); // 设置自动换行 cellStyle.setWrapText(true); // 设置双边框 XSSFCellStyle cellStyleDouble = (XSSFCellStyle) wb.createCellStyle(); // 设置边框 // 设置单元格内容水平对齐 cellStyleDouble.setAlignment(XSSFCellStyle.ALIGN_CENTER); // 设置单元格内容垂直对齐 cellStyleDouble.setVerticalAlignment(XSSFCellStyle.VERTICAL_CENTER); // 设置自动换行 cellStyleDouble.setWrapText(true); // 合并单元格 for (int t = 0; t < cellRowNum; t++) { SXSSFRow row = (SXSSFRow) sheet.createRow(t + startRow); List<CellModel> cellNameList = cellListMap.get(String.valueOf(t)); for (CellModel cellModel : cellNameList) { // 如果被合并的元素只占用了一个单元格则不进行合并 if (cellModel.getStartColumn() == cellModel.getEndColumn() && cellModel.getEndRow() == cellModel.getStartRow()) { continue; } sheet.addMergedRegion(new CellRangeAddress(cellModel.getStartRow(), cellModel.getEndRow(), cellModel.getStartColumn(), cellModel.getEndColumn())); } // create的cell Set<Integer> create = new HashSet<Integer>(); for (int i = 0; i < cellNameList.size(); i++) { CellModel cellModel = cellNameList.get(i); // 遍历插入表头 SXSSFCell cell = (SXSSFCell) row.createCell(cellModel.getStartColumn()); // 设置字体 XSSFFont font = (XSSFFont) wb.createFont(); font.setFontName("Times New Roman"); font.setFontHeightInPoints((short) 8); // 设置行高 if (i == 1) { row.setHeight((short) 500); } cellStyle.setFont(font); cell.setCellValue(cellModel.getCellName()); cell.setCellStyle(cellStyle); create.add(cellModel.getStartColumn()); } // 把所有没有create的cell都create for (int i = 0; i < totalcolumn; i++) { if (!(create.contains(i))) { // 设置字体 XSSFFont font = (XSSFFont) wb.createFont(); font.setFontName("Times New Roman"); font.setFontHeightInPoints((short) 8); cellStyle.setFont(font); SXSSFCell cell = (SXSSFCell) row.createCell(i); cell.setCellStyle(cellStyle); } } } for (LinkedHashMap hashMap : exportData) { SXSSFRow rowValue = (SXSSFRow) sheet.createRow(cellRowNum + startRow); Iterator<Map.Entry> iteratorRow = hashMap.entrySet().iterator(); while (iteratorRow.hasNext()) { Map.Entry entryRow = iteratorRow.next(); Integer key = Integer.valueOf(entryRow.getKey().toString()); String value = ""; if (entryRow.getValue() != null) { value = entryRow.getValue().toString(); } else { value = ""; } SXSSFCell cellValue = (SXSSFCell) rowValue.createCell(key - 1); // 设置字体 XSSFFont font = (XSSFFont) wb.createFont(); font.setFontName("Times New Roman"); font.setFontHeightInPoints((short) 8); cellValue.setCellValue(value); cellStyle.setFont(font); cellValue.setCellStyle(cellStyle); } cellRowNum++; } // 设置备注栏 List<String> reMarkList = ggreportingtemplateDto.getRemake(); if (reMarkList != null) { for (int i = 0; i < reMarkList.size() + 1; i++) { int rowNum = i + startRow + cellRowNum + 1; XSSFCellStyle cellStyleRemake = (XSSFCellStyle) wb.createCellStyle(); SXSSFRow rowRemake = (SXSSFRow) sheet.createRow(rowNum); XSSFFont fontRemake = (XSSFFont) wb.createFont(); fontRemake.setFontHeightInPoints((short) 8); cellStyleRemake.setFont(fontRemake); String cellValue = "Notes:"; // 合并条件单元格 if (i != 0) { sheet.addMergedRegion(new CellRangeAddress(rowNum, rowNum, 0, 4)); cellValue = reMarkList.get(i - 1); SXSSFCell cell = (SXSSFCell) rowRemake.createCell(0); cell.setCellValue(cellValue); cell.setCellStyle(cellStyleRemake); } else { SXSSFCell cell = (SXSSFCell) rowRemake.createCell(0); cell.setCellValue(cellValue); cell.setCellStyle(cellStyleRemake); } } } // 设置列宽 if (columnWidth != null) { for (int i = 0; i < columnWidth.length; i++) { sheet.setColumnWidth(i, columnWidth[i]); } } return wb; } 以上是我生成sheet表的内容 //exceptional Rpt public SXSSFWorkbook exceptionalRpt (GgreportingtemplateDto ggreportingtemplateDto, String startInputDate,String endInputDate) throws Exception { // 设置最大数据行数 SXSSFWorkbook wb = new SXSSFWorkbook(5050);//这里之前看到是说能设置这个表格最多能含有多少数据 Map<String, List<CellModel>> map = new HashMap<String, List<CellModel>>(); // 设置数据 // 第一级表头 List<CellModel> firstRow = new ArrayList<CellModel>(); CellModel cellModel1 = new CellModel(); // 总占用1行 Integer cellRow = 1; cellModel1.setCellName("Member English Name"); cellModel1.setStartRow(0); cellModel1.setEndRow(0); cellModel1.setStartColumn(0); cellModel1.setEndColumn(0); CellModel cellModel2 = new CellModel(); cellModel2.setCellName("Member Chinese Name"); cellModel2.setStartRow(0); cellModel2.setEndRow(0); cellModel2.setStartColumn(1); cellModel2.setEndColumn(1); CellModel cellModel3 = new CellModel(); cellModel3.setCellName("Staff No."); cellModel3.setStartRow(0); cellModel3.setEndRow(0); cellModel3.setStartColumn(2); cellModel3.setEndColumn(2); CellModel cellModel4 = new CellModel(); cellModel4.setCellName("HKID/Passport No."); cellModel4.setStartRow(0); cellModel4.setEndRow(0); cellModel4.setStartColumn(3); cellModel4.setEndColumn(3); CellModel cellModel5 = new CellModel(); cellModel5.setCellName("Sex"); cellModel5.setStartRow(0); cellModel5.setEndRow(0); cellModel5.setStartColumn(4); cellModel5.setEndColumn(4); CellModel cellModel6 = new CellModel(); cellModel6.setCellName("Plan Code"); cellModel6.setStartRow(0); cellModel6.setEndRow(0); cellModel6.setStartColumn(5); cellModel6.setEndColumn(5); CellModel cellModel7 = new CellModel(); cellModel7.setCellName("Plan Description"); cellModel7.setStartRow(0); cellModel7.setEndRow(0); cellModel7.setStartColumn(6); cellModel7.setEndColumn(6); CellModel cellModel8 = new CellModel(); cellModel8.setCellName("Effective Date"); cellModel8.setStartRow(0); cellModel8.setEndRow(0); cellModel8.setStartColumn(7); cellModel8.setEndColumn(7); CellModel cellModel9 = new CellModel(); cellModel9.setCellName("Status"); cellModel9.setStartRow(0); cellModel9.setEndRow(0); cellModel9.setStartColumn(8); cellModel9.setEndColumn(8); firstRow.add(cellModel1); firstRow.add(cellModel2); firstRow.add(cellModel3); firstRow.add(cellModel4); firstRow.add(cellModel5); firstRow.add(cellModel6); firstRow.add(cellModel7); firstRow.add(cellModel8); firstRow.add(cellModel9); map.put("0", firstRow); // 业务数据 List<LinkedHashMap> exportData = new ArrayList<LinkedHashMap>(); GuPolicyCopyItemMedgMembDto guPolicyCopyItemMedgMembDto = new GuPolicyCopyItemMedgMembDto(); List<GuPolicyCopyItemMedgMembDto> list = ServiceManager.prpall.getGuPolicyCopyItemMedgMembService().findALL(guPolicyCopyItemMedgMembDto, null);//这里查询出来是295条 //增加数据 用这端代码增加5000条数据 /*for (int i = 0; i < 5000; i++) { list.add((GuPolicyCopyItemMedgMembDto)list.get(0)); }*/ int countRow = 0; for (int i = 0; i < list.size(); i++) { GuPolicyCopyItemMedgMembDto data = (GuPolicyCopyItemMedgMembDto) list.get(i); LinkedHashMap<String,String> row = new LinkedHashMap<String,String>(); String struts = ""; String ename = ""; String cname = ""; String idno = ""; String staffno = ""; String sex = ""; String rationType = ""; String rationName = ""; String entryDate = ""; String chineseName = ""; String hKIDandPassportNo = ""; if(data.getFlag()==null||data.getFlag().equals("I")) { struts = "Add"; }else if(data.getFlag().equals("U")){ struts = "Amendment"; }else if(data.getFlag().equals("D")){ struts = "Deletion"; }else if(data.getFlag().equals("B")){ struts = "Cancellation"; } if(data.getClientEName() != null&&!(data.getClientEName().equals(""))) { ename = data.getClientEName(); } if(data.getClientCName() != null&&!(data.getClientCName().equals(""))) { cname = data.getClientCName(); } if(data.getIdNo() != null&&!(data.getIdNo().equals(""))) { idno = data.getIdNo(); } if(data.getStaffNo() != null&&!(data.getStaffNo().equals(""))) { staffno = data.getStaffNo(); } if(data.getSex() != null&&!(data.getSex().equals(""))) { sex = data.getSex(); } if(data.getRationType() != null&&!(data.getRationType().equals(""))) { rationType = data.getRationType(); } if(data.getRationName() != null&&!(data.getRationName().equals(""))) { rationName = data.getRationName(); } if(data.getEntryDate() != null) { entryDate = sim.format(data.getEntryDate()); } /*row.put("1", ""+ename+""); row.put("2", ""+cname+""); row.put("3", ""+staffno+""); row.put("4", ""+idno+""); row.put("5", ""+sex+""); row.put("6", ""+rationType+""); row.put("7", ""+rationName+""); row.put("8", ""+entryDate+""); row.put("9", ""+struts+"");*/ row.put("1", "1"); row.put("2", "2"); row.put("3", "3"); row.put("4", "4"); row.put("5", "5"); row.put("6", "6"); row.put("7", "7"); row.put("8", "8"); row.put("9", "9"); exportData.add(row); countRow++; } // 用于写入文件 // 列宽数组 int[] columnWidth = { 10000, 7500, 5000, 7500, 5000, 7500, 10000, 5000, 5000 }; // 报表标题 ggreportingtemplateDto.setTitle(null); List<String> remakeList = null; // 报表备注 ggreportingtemplateDto.setRemake(remakeList); ggreportingtemplateDto.setCondition(null); //数据分页 if(exportData.size()>5000) { double size = exportData.size(); double divisor = size/5000; int forNumber = (new Double(Math.ceil(divisor))).intValue(); for (int i = 0; i < forNumber; i++) { if((i+1)==forNumber) { List<LinkedHashMap> exportDataTemp = exportData.subList(0+(i*5000), exportData.size()-1); wb = this.createCSVUtil2(0, "Exceptional Rpt"+(i+1), wb, map, cellRow, exportDataTemp, columnWidth, columnWidth.length, ggreportingtemplateDto, 0); }else { List<LinkedHashMap> exportDataTemp = exportData.subList(0+(i*5000), 5000+(i*5000 )); wb = this.createCSVUtil2(0, "Exceptional Rpt"+(i+1), wb, map, cellRow, exportDataTemp, columnWidth, columnWidth.length, ggreportingtemplateDto, 0); } } }else { wb = this.createCSVUtil2(0, "Exceptional Rpt", wb, map, cellRow, exportData, columnWidth, columnWidth.length, ggreportingtemplateDto, 0); } /*wb = this.createCSVUtil2(0, "Exceptional Rpt", wb, map, cellRow, exportData, columnWidth, columnWidth.length, ggreportingtemplateDto, 0);*/ return wb; } 一开始SXSSFWorkbook wb = new SXSSFWorkbook(5050)这里的值给的5000 ,然后当数据量大于5000时直接报错,文件不能正常导出,然后我把5000改成7000,会报错但是文件能导出,是损坏文件,一条数据都没有,后来修改成分页导出,自己测试的时候任然报了数组下标越界,且越界的下标为负值,文件能正常导出,但导出的文件显示已损坏,看不到数据。报错代码图片以上传,求大神解答,解答有效我微信转账请大神喝奶茶 java.lang.ArrayIndexOutOfBoundsException: -20527 at java.util.ArrayList.elementData(ArrayList.java:418) at java.util.ArrayList.get(ArrayList.java:431) at org.apache.poi.xssf.model.StylesTable.getFontAt(StylesTable.java:386) at org.apache.poi.xssf.usermodel.XSSFWorkbook.getFontAt(XSSFWorkbook.java:954) at org.apache.poi.xssf.streaming.SXSSFWorkbook.getFontAt(SXSSFWorkbook.java:857) at org.apache.poi.ss.util.SheetUtil.getCellWidth(SheetUtil.java:148) at org.apache.poi.xssf.streaming.AutoSizeColumnTracker.updateColumnWidth(AutoSizeColumnTracker.java:367) at org.apache.poi.xssf.streaming.AutoSizeColumnTracker.updateColumnWidths(AutoSizeColumnTracker.java:333) at org.apache.poi.xssf.streaming.SXSSFSheet.flushOneRow(SXSSFSheet.java:1892) at org.apache.poi.xssf.streaming.SXSSFSheet.flushRows(SXSSFSheet.java:1871) at org.apache.poi.xssf.streaming.SXSSFSheet.flushRows(SXSSFSheet.java:1882) at org.apache.poi.xssf.streaming.SXSSFWorkbook.write(SXSSFWorkbook.java:931) at com.sinosoft.application.platform.web.action.GgReportingTemplateAction.download(GgReportingTemplateAction.java:267) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.sinosoft.application.common.BaseProcessAction.execute(BaseProcessAction.java:213) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:216) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:117) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) at javax.servlet.http.HttpServlet.service(HttpServlet.java:661) at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:198) at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:176) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:124) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:110) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149) at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at com.sinosoft.application.common.CAS_LANGUATE.doFilter(CAS_LANGUATE.java:35) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at com.sinosoft.sysframework.web.control.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:99) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at com.sinosoft.application.common.CompatibleFilter.doFilter(CompatibleFilter.java:29) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at com.sinosoft.application.common.ValidateSalt.doFilter(ValidateSalt.java:56) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:160) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at com.sinosoft.application.common.LoadSalt.doFilter(LoadSalt.java:41) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:660) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:798) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:808) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) 此问题已解决,导致报错的原因是sheet.trackAllColumnsForAutoSizing();poi自动设置列宽的代码,注释这行之后问题解决。
导出大数据量excel,用POI
需要导出的数据量可能非常大(超过10W条),而且要照顾到没装07Excel的机器,不能用SXSSFworkbook。鉴于一个sheet页最多65000多条记录,那么大数据就需要多个sheet页。由于导出前要先查数据库,是应该一次查出所有数据然后导出还是分次查询?每次查询65000条数据?
sotower poi3.8 NoClassDefFoundError
IDE使用的是SoTower Studio Product Version: 3.1,在导入了poi3.8后启动报错,报错内容如下: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'measurePointsAction': Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/apache/poi/POIXMLDocument at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380) at org.sotower.dm.spring.AppContextLoader$3.call(AppContextLoader.java:311) at org.sotower.dm.spring.AppContextLoader$3.call(AppContextLoader.java:1) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269) at java.util.concurrent.FutureTask.run(FutureTask.java:123) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:595) Caused by: java.lang.NoClassDefFoundError: org/apache/poi/POIXMLDocument at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:183) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:576) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:546) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:477) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:465) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:445) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:211) at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:381) at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:457) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:398) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357) at java.lang.Class.getConstructor0(Class.java:2671) at java.lang.Class.getDeclaredConstructor(Class.java:1953) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:54) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877) ... 20 more 通过main方法测试导入Excel是成功的,但是就是通过tomcat启动就报错,一直没找到是什么原因,求大神帮助!!
java poi2.5 导出excel 乱码问题
![图片说明](https://img-ask.csdn.net/upload/201604/12/1460426715_844206.png) ![图片说明](https://img-ask.csdn.net/upload/201604/12/1460426724_240746.png) ![图片说明](https://img-ask.csdn.net/upload/201604/12/1460426734_880075.png) 我在代码里有设置编码 在某个单元格设置“单位”中文字符后,导出的excel就出现乱码的问题,求解答,网上百度了几种方法都不行。谢谢各位了
poi 3.8 读取excel 只能读出第一行的第一列的值
String fileToBeRead = "文件路径"; //读取文件 HSSFWorkbook workbook = new HSSFWorkbook(new FileInputStream(fileToBeRead)); HSSFSheet sheet = workbook.getSheetAt(0); int rowNum = sheet.getPhysicalNumberOfRows(); HSSFRow row ; int cellNum; for(int i=0;i<rowNum;i++){ row = sheet.getRow(i); cellNum = row.getPhysicalNumberOfCells(); for(int j=0;i<cellNum;j++){ System.out.println(row.getCell(j).getStringCellValue()); } } Excel中我把所有的值的类型都设成了文本类型,可是只能读出第一行的第一列的值 日志信息中有一句 "application/json;charset=UTF-8" using [org.springframework.http.converter.json.MappingJacksonHttpMessageConverter@1dc11af]
java POI3.8 Excel 下载 发现不可读取内容 解决办法??
![图片说明](https://img-ask.csdn.net/upload/201701/17/1484635471_937430.png) ![图片说明](https://img-ask.csdn.net/upload/201701/17/1484635688_899413.png) ``` /** * 导出历史记录 */ @SuppressWarnings({ "deprecation", "unchecked" }) @RequestMapping("export-TrainHistoryRecord") @ResponseBody protected void buildExcelDocument(EmployeeTrainHistoryQuery query,ModelMap model, SXSSFWorkbook workbook, HttpServletRequest request, HttpServletResponse response) throws Exception { //这里使用SXSSFWorkbook对象,支持1048576条数据 try { response.reset(); // 获得国际化语言 RequestContext requestContext = new RequestContext(request); String CourseCompany = requestContext .getMessage("manage-student-trainRecods"); response.setContentType("APPLICATION/vnd.ms-excel;charset=UTF-8"); // 注意,如果去掉下面一行代码中的attachment; 那么也会使IE自动打开文件。 response.setHeader( "Content-Disposition", "attachment; filename=" + java.net.URLEncoder.encode( DateUtil.getExportDate() + ".xlsx", "UTF-8"));//Excel 扩展名指定为xlsx SXSSFWorkbook对象只支持xlsx格式 OutputStream os = response.getOutputStream();// new CellStyle style = workbook.createCellStyle(); // 设置样式 style.setFillForegroundColor(HSSFColor.SKY_BLUE.index); style.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND); style.setBorderBottom(HSSFCellStyle.BORDER_THIN); style.setBorderLeft(HSSFCellStyle.BORDER_THIN); style.setBorderRight(HSSFCellStyle.BORDER_THIN); style.setBorderTop(HSSFCellStyle.BORDER_THIN); style.setAlignment(HSSFCellStyle.ALIGN_CENTER); String employeeCode = requestContext.getMessage("employeeCode"); String employeeName = requestContext.getMessage("employeeName"); String orgName = requestContext.getMessage("orgName"); String startDate = requestContext.getMessage("start.date"); String endDate = requestContext.getMessage("end.date"); String courseCode = requestContext.getMessage("courseCode"); String courseName = requestContext.getMessage("courseName"); String sessionName = requestContext.getMessage("sessionName"); String hoursNunber = requestContext.getMessage("hoursNunber"); // FileOutputStream(filePath); List<EmployeeTrainHistoryModel> list = null; query.setNeedQueryAll(true); try { // if("0".equals(query.getTrainFlag())){ query.setTotalItem(employeeTrainHistoryService.fetchCountEmployeeTrainHistoryByQuery(query)); int page_size = 100000;// 数据库中存储的数据行数 int list_count =query.getTotalItem(); int export_times = list_count % page_size > 0 ? list_count / page_size + 1 : list_count / page_size; for (int m = 0; m < export_times; m++) { query.setNeedQueryAll(false); query.setPageSize(100000);//每页显示多少条数据 query.setCurrentPage(m+1);//设置第几页 list=employeeTrainHistoryService.getEmployeeTrainHistoryByQuery(query); int len = list.size() < page_size ? list.size() : page_size; //新建sheet Sheet sheet = null; sheet = workbook.createSheet(System.currentTimeMillis() + CourseCompany+m); // for (int n = 0; n < len; n++) { // 迭代数据 if (list != null && list.size() > 0) { int rowNum = 1; int max_row=300000; int sheet_count=0; for (int i = 0; i < list.size(); i++) { EmployeeTrainHistoryModel history=list.get(i); //如果当前行超过单页签可容纳最大行则换页签 // if(i==0||i==(max_row*sheet_count+1)){ sheet.setDefaultColumnWidth((short) 17); // 创建属于上面Sheet的Row,参数0可以是0~65535之间的任何一个, Row header = sheet.createRow(0); // 第0行 // 产生标题列 Cell cell; String[] headerArr = new String[] { employeeCode, employeeName, orgName, startDate, endDate, courseCode, courseName, sessionName, hoursNunber }; for (int j = 0; j < headerArr.length; j++) { cell = header.createCell((short) j); cell.setCellStyle(style); cell.setCellValue(headerArr[j]); } Row row = sheet.createRow(rowNum++); row.createCell((short) 0).setCellValue( history.getEmployeeCode()); row.createCell((short) 1).setCellValue( history.getEmployeeName()); row.createCell((short) 2) .setCellValue(history.getOrgName()); if (history.getTrainBeginTime() != null) { row.createCell((short) 3).setCellValue( DateUtil.toString(history.getTrainBeginTime())); } else { row.createCell((short) 3).setCellValue(""); } if (history.getTrainEndTime() != null) { row.createCell((short) 4).setCellValue( DateUtil.toString(history.getTrainEndTime())); } else { row.createCell((short) 4).setCellValue(""); } row.createCell((short) 5).setCellValue( history.getCourseCode()); row.createCell((short) 6).setCellValue( history.getCourseName()); row.createCell((short) 7).setCellValue( history.getSessionName()); if (history.getHoursNumber() != null) row.createCell((short) 8).setCellValue( history.getHoursNumber().toString()); } } list.clear(); } } catch (Exception e) { e.printStackTrace(); } try { workbook.write(os); model.put("msg", "1"); os.close(); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } catch (IOException e) { e.printStackTrace(); } } ```
关于android手机用poi3.8的jar包生成word文件
在项目中利用poi3.8根据模板生成doc文件,其中遇到了问题:根据含有表格或者图片模板文件,新生成的doc文件打开后是空白的,没显示任何的内容,也没报错,但是在没有表格和图片的基础上是正常显示的。请问各位大神有什么办法解决吗?请多多指教。
关于导出Excel的poi库问题
现有库为poi3.9 利用模板导出同样的表格Excel2010及以下单元格样式显示正确方式,2013及以上部分单元格丢失样式,请问poi库2.9不支持office2010以上的内核处理么
使用POI导出word文档时,将数据写入输出流报错
**org.apache.poi.openxml4j.exceptions.OpenXML4JRuntimeException: Fail to save: an error occurs while saving the package : class org.apache.poi.openxml4j.util.ZipSecureFile$ThresholdInputStream cannot be cast to class java.util.zip.ZipFile$ZipFileInputStream (org.apache.poi.openxml4j.util.ZipSecureFile$ThresholdInputStream is in unnamed module of loader 'app'; java.util.zip.ZipFile$ZipFileInputStream is in module java.base of loader 'bootstrap')** ``` at org.apache.poi.openxml4j.opc.ZipPackage.saveImpl(ZipPackage.java:595) at org.apache.poi.openxml4j.opc.OPCPackage.save(OPCPackage.java:1539) at org.apache.poi.POIXMLDocument.write(POIXMLDocument.java:227) at com.xinpengtech.operation.co.order.base.service.WordUtil.exportWord(WordUtil.java:38) at com.xinpengtech.operation.co.order.base.service.CoOrderService.export(CoOrderService.java:778) at com.xinpengtech.operation.co.order.base.service.CoOrderService$$FastClassBySpringCGLIB$$977f0048.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:685) at com.xinpengtech.operation.co.order.base.service.CoOrderService$$EnhancerBySpringCGLIB$$f95e785a.export(<generated>) at com.xinpengtech.operation.co.order.base.view.TranscriptController.export(TranscriptController.java:37) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:888) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:793) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943) ...... ``` 我现在做的项目要用到导出文件的功能,然后就去学了Apache POI通过模板文件生成word文档的功能。 我写的demo在main方法和web接口下都能正常生成生成word文档;但是一移植到公司的项目上就报错了,controller和service层的业务逻辑是没问题的,调用到poi的api时才开始报错。我觉得和项目之间jar包依赖有关,因为系统刚拆了微服务,也不知道是不是这个原因,求解 ``` /** * 根据模板生成word文档 * @param inputUrl 模板路径 * @param textMap 要替换的参数 * @param tableList 表格参数 */ public static void exportWord(String inputUrl, String fileName, Map<String, String> textMap, List<String[]> tableList, HttpServletResponse response){ try{ // 获取docx解析对象 XWPFDocument document = new XWPFDocument(POIXMLDocument.openPackage(inputUrl)); // 解析替换文本段落对象 changeText(document, textMap); // 解析替换表格对象 changeTable(document, textMap, tableList); // 导出到response输出流中 ServletOutputStream os = response.getOutputStream(); response.setHeader("Content-disposition", "attachment;fileName=" + fileName); document.write(os); // 这里报错 os.close(); }catch(Exception e){ e.printStackTrace(); } } ```
求教poi3.8获取单元格上下拉列表数据
由于项目中做导出excel需要用到模板,但在模板中插入一行后没有根据上一行自动生成下拉列表,需要拷贝上一行的样式,但是上一行的有些单元格的下拉列表无法获取,导致插入的行无法用代码去生成跟上一行相同的下拉列表,同时若移动有下拉列表的行,移动后下拉列表没有跟着移动,反编译了poi的jar包也没找到相应的方法,特此跑来求助网络上的各位大神能够提供些帮助,多谢!
java中如何使用poi3.10将docx文件转换成html文件?
java 中poi3.10怎么读取docx版本的文档为html
java中如何使用poi3.10将docx文件转换成html文件预览
java中如何使用poi3.10将docx文件转换成html文件预览
爬虫福利二 之 妹子图网MM批量下载
爬虫福利一:27报网MM批量下载    点击 看了本文,相信大家对爬虫一定会产生强烈的兴趣,激励自己去学习爬虫,在这里提前祝:大家学有所成! 目标网站:妹子图网 环境:Python3.x 相关第三方模块:requests、beautifulsoup4 Re:各位在测试时只需要将代码里的变量 path 指定为你当前系统要保存的路径,使用 python xxx.py 或IDE运行即可。
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、PDF搜索网站推荐 对于大部
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 顺便拉下票,我在参加csdn博客之星竞选,欢迎投票支持,每个QQ或者微信每天都可以投5票,扫二维码即可,http://m234140.nofollow.ax.
比特币原理详解
一、什么是比特币 比特币是一种电子货币,是一种基于密码学的货币,在2008年11月1日由中本聪发表比特币白皮书,文中提出了一种去中心化的电子记账系统,我们平时的电子现金是银行来记账,因为银行的背后是国家信用。去中心化电子记账系统是参与者共同记账。比特币可以防止主权危机、信用风险。其好处不多做赘述,这一层面介绍的文章很多,本文主要从更深层的技术原理角度进行介绍。 二、问题引入  假设现有4个人
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 IT 类的外包开发,是非标品开发,所以很有可能在开发过程中会有这样那样的需求修改,而这种需求修改很容易造成扯皮,进而影响到费用支付,甚至出现做完了项目收不到钱的情况。 那么,怎么保证自己的薪酬安全呢? 我们在开工前,一定要做好一些证据方面的准备(也就是“讨薪”的理论依据),这其中最重要的就是需求文档和验收标准。一定要让需求方提供这两个文档资料作为开发的基础。之后开发
网页实现一个简单的音乐播放器(大佬别看。(⊙﹏⊙))
今天闲着无事,就想写点东西。然后听了下歌,就打算写个播放器。 于是乎用h5 audio的加上js简单的播放器完工了。 欢迎 改进 留言。 演示地点跳到演示地点 html代码如下`&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;music&lt;/title&gt; &lt;meta charset="utf-8"&gt
Python十大装B语法
Python 是一种代表简单思想的语言,其语法相对简单,很容易上手。不过,如果就此小视 Python 语法的精妙和深邃,那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点,并附上详细的实例代码。如能在实战中融会贯通、灵活使用,必将使代码更为精炼、高效,同时也会极大提升代码B格,使之看上去更老练,读起来更优雅。 1. for - else 什么?不是 if 和 else 才
数据库优化 - SQL优化
前面一篇文章从实例的角度进行数据库优化,通过配置一些参数让数据库性能达到最优。但是一些“不好”的SQL也会导致数据库查询变慢,影响业务流程。本文从SQL角度进行数据库优化,提升SQL运行效率。 判断问题SQL 判断SQL是否有问题时可以通过两个表象进行判断: 系统级别表象 CPU消耗严重 IO等待严重 页面响应时间过长
2019年11月中国大陆编程语言排行榜
2019年11月2日,我统计了某招聘网站,获得有效程序员招聘数据9万条。针对招聘信息,提取编程语言关键字,并统计如下: 编程语言比例 rank pl_ percentage 1 java 33.62% 2 c/c++ 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7
通俗易懂地给女朋友讲:线程池的内部原理
餐厅的约会 餐盘在灯光的照耀下格外晶莹洁白,女朋友拿起红酒杯轻轻地抿了一小口,对我说:“经常听你说线程池,到底线程池到底是个什么原理?”我楞了一下,心里想女朋友今天是怎么了,怎么突然问出这么专业的问题,但做为一个专业人士在女朋友面前也不能露怯啊,想了一下便说:“我先给你讲讲我前同事老王的故事吧!” 大龄程序员老王 老王是一个已经北漂十多年的程序员,岁数大了,加班加不动了,升迁也无望,于是拿着手里
经典算法(5)杨辉三角
写在前面: 我是 扬帆向海,这个昵称来源于我的名字以及女朋友的名字。我热爱技术、热爱开源、热爱编程。技术是开源的、知识是共享的。 这博客是对自己学习的一点点总结及记录,如果您对 Java、算法 感兴趣,可以关注我的动态,我们一起学习。 用知识改变命运,让我们的家人过上更好的生活。 目录一、杨辉三角的介绍二、杨辉三角的算法思想三、代码实现1.第一种写法2.第二种写法 一、杨辉三角的介绍 百度
腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹?
昨天,有网友私信我,说去阿里面试,彻底的被打击到了。问了为什么网上大量使用ThreadLocal的源码都会加上private static?他被难住了,因为他从来都没有考虑过这个问题。无独有偶,今天笔者又发现有网友吐槽了一道腾讯的面试题,我们一起来看看。 腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹? 在互联网职场论坛,一名程序员发帖求助到。二面腾讯,其中一个算法题:64匹
面试官:你连RESTful都不知道我怎么敢要你?
面试官:了解RESTful吗? 我:听说过。 面试官:那什么是RESTful? 我:就是用起来很规范,挺好的 面试官:是RESTful挺好的,还是自我感觉挺好的 我:都挺好的。 面试官:… 把门关上。 我:… 要干嘛?先关上再说。 面试官:我说出去把门关上。 我:what ?,夺门而去 文章目录01 前言02 RESTful的来源03 RESTful6大原则1. C-S架构2. 无状态3.统一的接
为啥国人偏爱Mybatis,而老外喜欢Hibernate/JPA呢?
关于SQL和ORM的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行了一番讨论,感触还是有一些,于是就有了今天这篇文。 声明:本文不会下关于Mybatis和JPA两个持久层框架哪个更好这样的结论。只是摆事实,讲道理,所以,请各位看官勿喷。 一、事件起因 关于Mybatis和JPA孰优孰劣的问题,争论已经很多年了。一直也没有结论,毕竟每个人的喜好和习惯是大不相同的。我也看
SQL-小白最佳入门sql查询一
一 说明 如果是初学者,建议去网上寻找安装Mysql的文章安装,以及使用navicat连接数据库,以后的示例基本是使用mysql数据库管理系统; 二 准备前提 需要建立一张学生表,列分别是id,名称,年龄,学生信息;本示例中文章篇幅原因SQL注释略; 建表语句: CREATE TABLE `student` ( `id` int(11) NOT NULL AUTO_INCREMENT, `
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // dosho
【图解经典算法题】如何用一行代码解决约瑟夫环问题
约瑟夫环问题算是很经典的题了,估计大家都听说过,然后我就在一次笔试中遇到了,下面我就用 3 种方法来详细讲解一下这道题,最后一种方法学了之后保证让你可以让你装逼。 问题描述:编号为 1-N 的 N 个士兵围坐在一起形成一个圆圈,从编号为 1 的士兵开始依次报数(1,2,3…这样依次报),数到 m 的 士兵会被杀死出列,之后的士兵再从 1 开始报数。直到最后剩下一士兵,求这个士兵的编号。 1、方
致 Python 初学者
文章目录1. 前言2. 明确学习目标,不急于求成,不好高骛远3. 在开始学习 Python 之前,你需要做一些准备2.1 Python 的各种发行版2.2 安装 Python2.3 选择一款趁手的开发工具3. 习惯使用IDLE,这是学习python最好的方式4. 严格遵从编码规范5. 代码的运行、调试5. 模块管理5.1 同时安装了py2/py35.2 使用Anaconda,或者通过IDE来安装模
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,
程序员:我终于知道post和get的区别
IT界知名的程序员曾说:对于那些月薪三万以下,自称IT工程师的码农们,其实我们从来没有把他们归为我们IT工程师的队伍。他们虽然总是以IT工程师自居,但只是他们一厢情愿罢了。 此话一出,不知激起了多少(码农)程序员的愤怒,却又无可奈何,于是码农问程序员。 码农:你知道get和post请求到底有什么区别? 程序员:你看这篇就知道了。 码农:你月薪三万了? 程序员:嗯。 码农:你是怎么做到的? 程序员:
《程序人生》系列-这个程序员只用了20行代码就拿了冠军
你知道的越多,你不知道的越多 点赞再看,养成习惯GitHub上已经开源https://github.com/JavaFamily,有一线大厂面试点脑图,欢迎Star和完善 前言 这一期不算《吊打面试官》系列的,所有没前言我直接开始。 絮叨 本来应该是没有这期的,看过我上期的小伙伴应该是知道的嘛,双十一比较忙嘛,要值班又要去帮忙拍摄年会的视频素材,还得搞个程序员一天的Vlog,还要写BU
加快推动区块链技术和产业创新发展,2019可信区块链峰会在京召开
      11月8日,由中国信息通信研究院、中国通信标准化协会、中国互联网协会、可信区块链推进计划联合主办,科技行者协办的2019可信区块链峰会将在北京悠唐皇冠假日酒店开幕。   区块链技术被认为是继蒸汽机、电力、互联网之后,下一代颠覆性的核心技术。如果说蒸汽机释放了人类的生产力,电力解决了人类基本的生活需求,互联网彻底改变了信息传递的方式,区块链作为构造信任的技术有重要的价值。   1
程序员把地府后台管理系统做出来了,还有3.0版本!12月7号最新消息:已在开发中有github地址
第一幕:缘起 听说阎王爷要做个生死簿后台管理系统,我们派去了一个程序员…… 996程序员做的梦: 第一场:团队招募 为了应对地府管理危机,阎王打算找“人”开发一套地府后台管理系统,于是就在地府总经办群中发了项目需求。 话说还是中国电信的信号好,地府都是满格,哈哈!!! 经常会有外行朋友问:看某网站做的不错,功能也简单,你帮忙做一下? 而这次,面对这样的需求,这个程序员
网易云6亿用户音乐推荐算法
网易云音乐是音乐爱好者的集聚地,云音乐推荐系统致力于通过 AI 算法的落地,实现用户千人千面的个性化推荐,为用户带来不一样的听歌体验。 本次分享重点介绍 AI 算法在音乐推荐中的应用实践,以及在算法落地过程中遇到的挑战和解决方案。 将从如下两个部分展开: AI 算法在音乐推荐中的应用 音乐场景下的 AI 思考 从 2013 年 4 月正式上线至今,网易云音乐平台持续提供着:乐屏社区、UGC
【技巧总结】位运算装逼指南
位算法的效率有多快我就不说,不信你可以去用 10 亿个数据模拟一下,今天给大家讲一讲位运算的一些经典例子。不过,最重要的不是看懂了这些例子就好,而是要在以后多去运用位运算这些技巧,当然,采用位运算,也是可以装逼的,不信,你往下看。我会从最简单的讲起,一道比一道难度递增,不过居然是讲技巧,那么也不会太难,相信你分分钟看懂。 判断奇偶数 判断一个数是基于还是偶数,相信很多人都做过,一般的做法的代码如下
日均350000亿接入量,腾讯TubeMQ性能超过Kafka
整理 | 夕颜出品 | AI科技大本营(ID:rgznai100) 【导读】近日,腾讯开源动作不断,相继开源了分布式消息中间件TubeMQ,基于最主流的 OpenJDK8开发的
8年经验面试官详解 Java 面试秘诀
    作者 | 胡书敏 责编 | 刘静 出品 | CSDN(ID:CSDNnews) 本人目前在一家知名外企担任架构师,而且最近八年来,在多家外企和互联网公司担任Java技术面试官,前后累计面试了有两三百位候选人。在本文里,就将结合本人的面试经验,针对Java初学者、Java初级开发和Java开发,给出若干准备简历和准备面试的建议。   Java程序员准备和投递简历的实
面试官如何考察你的思维方式?
1.两种思维方式在求职面试中,经常会考察这种问题:北京有多少量特斯拉汽车? 某胡同口的煎饼摊一年能卖出多少个煎饼? 深圳有多少个产品经理? 一辆公交车里能装下多少个乒乓球? 一
相关热词 基于c#波形控件 c# 十进制转十六进制 对文件aes加密vc# c#读取栈中所有的值 c# rsa256加密 好 学c# 还是c++ c# 和java的差距 c# curl网络框架 c# https证书请求 c# 中崎
立即提问