@PostMapping("/WarehouseAreaMatter/downloadExcel")
@ApiOperation(value = "下载导入物料模板excel", notes = "下载导入物料模板excel")
public void downloadExcel(HttpServletResponse httpResponse) throws IOException {
ExcelUtil.configResponse(httpResponse);
ClassPathResource classPathResource = new ClassPathResource("水质指标模板.xlsx");
byte[] bytes = IOUtils.toByteArray(classPathResource.getInputStream());
IOUtils.write(bytes,httpResponse.getOutputStream());
}
文件目录