try {
List<FileItem> list = fileUpload.parseRequest(new ServletRequestContext(req));
System.out.println(list);
for (FileItem fileItem : list ) {
// 附件上传的表单解析
if (!fileItem.isFormField()) {
//是附件
InputStream inputStream = null;
try {
inputStream = fileItem.getInputStream();
} catch (IOException e) {
e.printStackTrace();
}
ExcelReaderBuilder readerWorkBook = EasyExcel.read(inputStream, BoltUpload.class,boltListener);
ExcelReaderSheetBuilder sheet = readerWorkBook.sheet();
sheet.doRead();
} else {
//普通表单
}
}