Spring:Apache POI Excel文件下载"当前政策属性"构建日志中的错误

时间:2016-10-17 15:12:48

标签: java spring spring-mvc apache-poi

我有一个非常简单的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

这是什么意思?这是值得担心的吗?

1 个答案:

答案 0 :(得分:0)

这里有很多相关问题,例如thisthat 它似乎是由某些防火墙/代理/防病毒软件修改你下载的jar。