@RequestMapping(value = "dowlondTemplateFile")
public ResponseEntity getFile(HttpServletResponse response) throws IOException {
String fileName = "合同历史模板.xlsx";
ClassPathResource resource = new ClassPathResource("static" + File.separator + "templateFile" + File.separator + fileName);
try {
File file = resource.getFile();
//下载文件路径
if (file.exists()) {
if (SecurityUtil.getOnlineUser() != null) {
LogUtil.info(SecurityUtil.getOnlineUser().getId(), SecurityUtil.getOnlineUser().getName(),
"下载文件", "成功",
"下载文件,id", "");
}
HttpHeaders headers = new HttpHeaders();
//下载显示的文件名,解决中文名称乱码问题
String downloadFileName = new String(fileName.getBytes("UTF-8"), "iso-8859-1&