@@ -47,7 +47,9 @@ public class Word2PDFController {
log.info("转换成功,用时:" + (end - start) + "ms");
word.delete();
- return org.apache.commons.io.FileUtils.readFileToByteArray(target);
+ byte[] res = org.apache.commons.io.FileUtils.readFileToByteArray(target);
+ target.delete();
+ return res;
} catch (Exception e) {
log.error("转换失败", e);
throw new BusinessException("转换失败" + e.getMessage());