Activiti導出模型文件xml(xml文件超過10K)


Activiti導出超過10K的xml文件時,response 要在獲取輸出流之前設置header格式

原代碼為:

ByteArrayInputStream in = new ByteArrayInputStream(exportBytes);

IOUtils.copy(in, response.getOutputStream());

response.setHeader("Content-Disposition", "attachment; filename="+ filename);

response.flushBuffer();

修改后,代碼為:

ByteArrayInputStream in = new ByteArrayInputStream(exportBytes);

response.setHeader("Content-Disposition", "attachment; filename="+ filename);

IOUtils.copy(in, response.getOutputStream());

response.flushBuffer();


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM