我有一个非常简单的Controller方法,它使用Apache POI库下载excel文件,该库在Service类中生成,如下所示:
XSSFWorkbook workbook = new XSSFWorkbook();
// Excel sheet populated and added to workbook
FileOutputStream out = new FileOutputStream(new File("file.xlsx"));
workbook.write(out);
out.close();
以下Controller方法触发下载。
@ResponseBody
@RequestMapping(value = "/fileDownload")
public String downloadMatchingExcel(HttpServletRequest request, HttpServletResponse response) throws IOException{
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setHeader("Content-Disposition", "attachment; filename = file.xlsx");
response.setHeader("Content-Length", String.valueOf(file.length()));
FileInputStream is = new FileInputStream(new File("file.xlsx"));
IOUtils.copy(is, response.getOutputStream());
response.flushBuffer();
response.getOutputStream().close();
}
生成并下载文件没有任何问题。但是我在构建日志中收到以下错误。
[ERROR] Current policy properties:
[ERROR] mmc.sess_pe_act.block_unsigned: false
[ERROR] window.num_max: 5
[ERROR] jscan.sess_applet_act.sig_trusted: pass
[ERROR] jscan.sess_applet_act.block_all: false
[ERROR] file.destructive.state: disabled
[ERROR] window.num_limited: true
[ERROR] jscan.sess_applet_act.unsigned: instrument
[ERROR] mmc.sess_pe_act.action: validate
[ERROR] jscan.session.daemon_protocol: http
[ERROR] file.read.state: disabled
[ERROR] mmc.sess_pe_act.block_invalid: true
[ERROR] mmc.sess_pe_act.block_blacklisted: false
[ERROR] jscan.session.policyname: QXBwbGV0L0FjdGl2ZVggU2VjdXJpdHkgR2xvYmFsIFBvbGljeSA=
[ERROR] net.bind_enable: false
[ERROR] mmc.sess_cab_act.block_unsigned: false
[ERROR] file.nondestructive.state: disabled
[ERROR] jscan.session.origin_uri: http://repo.spring.io/libs-release/org/apache/poi/poi-ooxml/3.11/poi-ooxml-3.11.jar
[ERROR] mmc.sess_cab_act.action: validate
[ERROR] net.connect_other: false
[ERROR] jscan.session.user_ipaddr: 172.24.8.56
[ERROR] jscan.sess_applet_act.sig_invalid: block
[ERROR] thread.thread_num_max: 8
[ERROR] mmc.sess_cab_act.block_invalid: true
[ERROR] jscan.sess_applet_act.sig_blacklisted: block
[ERROR] net.connect_src: true
[ERROR] thread.thread_num_limited: true
[ERROR] jscan.sess_applet_act.stub_out_blocked_applet: true
[ERROR] mmc.sess_cab_act.block_blacklisted: true
[ERROR] jscan.session.user_name: MTcyLjI0LjguNTY=
[ERROR] thread.threadgroup_create: false
[ERROR] file.write.state: disabled
这是什么意思?这是值得担心的吗?