/*附件下载*/
@RequestMapping(value="/downFile")
public void downFile(HttpServletResponse response){
try {
OutputStream os = null;
//获取文件名称
String filename = new String(jjkjGggl.getAccName().getBytes(),"ISO-8859-1");
//添加文件后缀
filename = filename+jjkjGggl.getAccType();
//附件存在 设置文件头:最后一个参数是设置下载文件名
response.setHeader("Content-Disposition", "attachment;filename="+filename);
os = response.getOutputStream();
byte[] b = jjkjGggl.getAccContent();
os.write(b);
os.flush();
os.close();
}
} catch (Exception e) {
logger.info("<--附件下载出现异常-->"+e);
}
}