Skip to content

shAdow-XJY/file_pass2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

file_pass2

  1. 基于之前的file_pass项目,进一步简单学习一下图片流输出和视频流输出。

  1. 图片流输出: 是读取本地图片文件流,写入http的response的输出流outputStream

  1. 视频流输出: http使用request和response,先是request设置好访问文件路径和类型,然后使用config/MediaHttpRequestHandler的handler函数。 handler(request,response)即可。

thinking

  1. no thinking, 准备润去看看webpack
  2. 访问图片: http://localhost:8081/getImage
  3. 访问视频: http://localhost:8081/getVideo

reference

  1. 一文看懂HttpServletResponse
  2. JAVA输出图片到浏览器
  3. SpringBoot 视频流和音频流(输出到浏览器)
  4. Spring MVC : ResourceHttpRequestHandler
  5. @Component注解的含义
  6. StringUtils.isEmpty is deprecated的原因

Releases

No releases published

Packages

No packages published

Languages