2021
11-16
11-16
从Springboot项目中下载文件的具体过程
最近在做一个临时的项目,APP端在检测到程序有更新时,需要去后台下载新的安装包。具体过程如下:controller层:/***下载app*@paramresponse*/@RequestMapping("downApp")@ResponseBodypublicvoidDownload(HttpServletResponseresponse){StringfileName="wuye.apk";Stringresult=FileUtil.downloadFile(response,fileName);log.info("app包下载结果:",result);}工具类:...
继续阅读 >