当前位置:网站首页>7.3.2 File Download & big file download
7.3.2 File Download & big file download
2020-11-06 01:14:00 【Memory】
All the source code in the project can be found in the linked repository :https://github.com/chenhaoxiang/uifuture-ssm
List of articles
7.3.2 adopt ResponseEntity Download the file
7.3.1 Section shows the transfer of files and objects , Now let's show you Spring MVC File download in .
The file download is relatively simple , You can also download files directly from the page by accessing the hyperlink to the file . But if the file name is Chinese name , It's possible that in some early browsers, it could lead to garbled code , So the download failed .
Spring MVC Provides ResponseEntity type , It is very convenient to define return header, return file name and status code .
stay FileController Add download method in . Take a look at Controller Class provides the download file method , Such as code list 7-27 Shown .
Controller Download method of layer
Code list 7-27:Controller Download method of layer
/**
* If there's a big file , Meeting OOM.
* There will be java.lang.OutOfMemor
版权声明
本文为[Memory]所创,转载请带上原文链接,感谢
边栏推荐
- 利用 AWS SageMaker BlazingText 对不均衡文本进行多分类
- 简直骚操作,ThreadLocal还能当缓存用
- Technical director, to just graduated programmers a word - do a good job in small things, can achieve great things
- Gradient understanding decline
- Serilog原始碼解析——使用方法
- Use of vuepress
- Don't go! Here is a note: picture and text to explain AQS, let's have a look at the source code of AQS (long text)
- Using Es5 to realize the class of ES6
- Elasticsearch database | elasticsearch-7.5.0 application construction
- DevOps是什么
猜你喜欢
Kitty中的动态线程池支持Nacos,Apollo多配置中心了
Computer TCP / IP interview 10 even asked, how many can you withstand?
Using Es5 to realize the class of ES6
读取、创建和运行多个文件的3个Python技巧
C++和C++程序员快要被市场淘汰了
Pattern matching: The gestalt approach一种序列的文本相似度方法
基于深度学习的推荐系统
直播预告 | 微服务架构学习系列直播第三期
简直骚操作,ThreadLocal还能当缓存用
3分钟读懂Wi-Fi 6于Wi-Fi 5的优势
随机推荐
如果前端不使用SPA又能怎样?- Hacker News
Kitty中的动态线程池支持Nacos,Apollo多配置中心了
How do the general bottom buried points do?
词嵌入教程
tensorflow之tf.tile\tf.slice等函数的基本用法解读
7.2.2 compressing static resources through gzipresourceresolver
7.3.1 file upload and zero XML registration interceptor
hadoop 命令总结
面经手册 · 第12篇《面试官,ThreadLocal 你要这么问,我就挂了!》
制造和新的自动化技术是什么?
Pattern matching: The gestalt approach一种序列的文本相似度方法
条码生成软件如何隐藏部分条码文字
Pycharm快捷键 自定义功能形式
直播预告 | 微服务架构学习系列直播第三期
2018中国云厂商TOP5:阿里云、腾讯云、AWS、电信、联通 ...
如何将数据变成资产?吸引数据科学家
Asp.Net Core學習筆記:入門篇
Use of vuepress
Sort the array in ascending order according to the frequency
Troubleshooting and summary of JVM Metaspace memory overflow