文件上传
2018-05-29 本文已影响0人
阿__飞

1.配置文件上传组件,解决传文件大于10M出现连接重置的问题

2. application 配置
# 文件上传
#默认支持文件上传.
# spring.http.multipart.enabled=true
#支持文件写入磁盘.
# spring.http.multipart.file-size-threshold=0
# 上传文件的临时目录
# spring.http.multipart.location=
# 最大支持文件大小
spring.http.multipart.max-file-size=10Mb
# 最大支持请求大小
spring.http.multipart.max-request-size=100Mb
3.简单的上传文件表单

4.文件上传的异常处理

5.文件上传方法实现
