簡體   English   中英

春季:Apache POI Excel文件在構建日志中下載“當前策略屬性”錯誤

[英]Spring: Apache POI Excel file download “Current policy properties” error in build log

我有一個非常簡單的Controller方法,可以使用在服務類中生成的Apache POI庫下載excel文件,如下所示:

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

這是什么意思? 有什么需要擔心的嗎?

有很多相對問題在這里,比如這個那個現在看來,這有些防火牆/代理/反病毒引起修改你下載的罐子。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM