当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- tensorflow之tf.tile\tf.slice等函数的基本用法解读
- Sort the array in ascending order according to the frequency
- Asp.Net Core learning notes: Introduction
- Polkadot series (2) -- detailed explanation of mixed consensus
- Elasticsearch 第六篇:聚合統計查詢
- Top 10 best big data analysis tools in 2020
- 用Keras LSTM构建编码器-解码器模型
- Use of vuepress
- 【QT】 QThread部分原始碼淺析
- Gradient understanding decline
猜你喜欢
随机推荐
python过滤敏感词记录
The practice of the architecture of Internet public opinion system
WeihanLi.Npoi 1.11.0/1.12.0 Release Notes
mac 安装hanlp,以及win下安装与使用
[译] 5个Vuex插件,给你的下个VueJS项目
【Flutter 實戰】pubspec.yaml 配置檔案詳解
xmppmini 專案詳解:一步一步從原理跟我學實用 xmpp 技術開發 4.字串解碼祕笈與訊息包
Grouping operation aligned with specified datum
Basic principle and application of iptables
技術總監,送給剛畢業的程式設計師們一句話——做好小事,才能成就大事
Anomaly detection method based on SVM
微信小程序:防止多次点击跳转(函数节流)
基於MVC的RESTFul風格API實戰
Serilog原始碼解析——使用方法
mac 下常用快捷键,mac启动ftp
业内首发车道级导航背后——详解高精定位技术演进与场景应用
事半功倍:在没有机柜的情况下实现自动化
Polkadot series (2) -- detailed explanation of mixed consensus
Analysis of ThreadLocal principle
自然语言处理之命名实体识别-tanfordcorenlp-NER(一)