/**
* 根据应聘者id下载对应的pdf简介
* @param request
* @param response
* @param id
* @return
* @throws IOException
*/
@SuppressWarnings("unused")
@RequestMapping(value = "/download", method = RequestMethod.GET)
@ResponseBody
public ResponseEntity<Object> downTemp2(HttpServletRequest request,HttpServletResponse response,Long id) throws IOException{
try {
if(id==null) {
return new ResponseEntity<>(Jsonoutput.jsonoutput("0011", "Id is null", ""),//系统错误
HttpStatus.INTERNAL_SERVER_ERROR);
}
Applicants arry = this.applicantsManageService.findByid(id);
//获取简历id
Long fileId=arry.getFileId();
//未上传简历
if(arry ==null && fileId==null) {
return new ResponseEntity<>(Jsonoutput.jsonoutput("0011", "fileId is null", ""),//系统错误
springboot 读取Blob 解析成文件
最新推荐文章于 2024-07-04 05:00:00 发布
该博客详细介绍了如何在SpringBoot应用中从数据库读取Blob类型的数据,并将其转换为文件供前端直接下载。通过实例代码展示了Blob到文件的转换过程,确保了数据的完整性和正确下载。
摘要由CSDN通过智能技术生成