java文件下载 异常 getOutputStream() has already been called for this response
@RequestMapping(value = "/downloadFile", method = RequestMethod.GET)
public void downloadFile(HttpServletResponse response,@RequestParam String filePath){
try {
String group= filePath.substring(0,filePath.indexOf("/"));
String path= filePath.substring(filePath.indexOf("/")+1,filePath.length());
ServletOutputStream toClient = response.getOutputStream();
response.setContentType("application/octet-stream");
java文件下载 异常 getOutputStream() has already been called for this response最先出现在Python成神之路。
共有 0 条评论