当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
猜你喜欢

How do the general bottom buried points do?

tensorflow之tf.tile\tf.slice等函数的基本用法解读

使用NLP和ML来提取和构造Web数据

快快使用ModelArts,零基础小白也能玩转AI!

做外包真的很难,身为外包的我也无奈叹息。

面经手册 · 第12篇《面试官,ThreadLocal 你要这么问,我就挂了!》

Can't be asked again! Reentrantlock source code, drawing a look together!

Grouping operation aligned with specified datum

(1)ASP.NET Core3.1 Ocelot介紹

Using Es5 to realize the class of ES6
随机推荐
嘘!异步事件这样用真的好么?
【快速因數分解】Pollard's Rho 演算法
业内首发车道级导航背后——详解高精定位技术演进与场景应用
Polkadot series (2) -- detailed explanation of mixed consensus
6.9.1 flashmapmanager initialization (flashmapmanager redirection Management) - SSM in depth analysis and project practice
谁说Cat不能做链路跟踪的,给我站出来
The practice of the architecture of Internet public opinion system
Grouping operation aligned with specified datum
3分钟读懂Wi-Fi 6于Wi-Fi 5的优势
Microservices: how to solve the problem of link tracing
Jmeter——ForEach Controller&Loop Controller
用Python构建和可视化决策树
连肝三个通宵,JVM77道高频面试题详细分析,就这?
Electron应用使用electron-builder配合electron-updater实现自动更新
Vue.js移动端左滑删除组件
2018中国云厂商TOP5:阿里云、腾讯云、AWS、电信、联通 ...
C language 100 question set 004 - statistics of the number of people of all ages
基于深度学习的推荐系统
Sort the array in ascending order according to the frequency
drf JWT認證模組與自定製