旋转的钢笔 2016-09-08 03:01 采纳率: 54.5%
浏览 7391
已采纳

我上传文件时报不能大于10M,我配置文件已经修改了,怎么解决????

Caused by: org.springframework.web.multipart.MultipartException: Could not parse multipart servlet request; nested exception is org.apache.commons.fileupload.FileUploadException: UT000020: Connection terminated as request was larger than 10485760
at org.springframework.web.multipart.commons.CommonsMultipartResolver.parseRequest(CommonsMultipartResolver.java:165) [spring-web-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.web.multipart.commons.CommonsMultipartResolver.resolveMultipart(CommonsMultipartResolver.java:142) [spring-web-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.checkMultipart(DispatcherServlet.java:1067) [spring-webmvc-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:906) [spring-webmvc-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870) [spring-webmvc-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961) [spring-webmvc-4.0.6.RELEASE.jar:4.0.6.RELEASE]
... 57 more
Caused by: org.apache.commons.fileupload.FileUploadException: UT000020: Connection terminated as request was larger than 10485760
at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:369) [commons-fileupload-1.2.jar:1.2]
at org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:126) [commons-fileupload-1.2.jar:1.2]
at org.springframework.web.multipart.commons.CommonsMultipartResolver.parseRequest(CommonsMultipartResolver.java:158) [spring-web-4.0.6.RELEASE.jar:4.0.6.RELEASE]
... 62 more

这是我的配置文件
<bean id="multipartResolver"
    class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
    <!-- one of the properties available; the maximum file size in bytes -->
    <property name="maxUploadSize" value="99999999999" />
</bean> 
  • 写回答

3条回答 默认 最新

  • 旋转的钢笔 2017-11-01 00:55
    关注

    问题最终解决方案:在wildfly控制台有个configuration,找到http点击view--》edit--》修改Max post size:

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

问题事件

  • 已采纳回答 12月24日

悬赏问题

  • ¥15 如何让企业微信机器人实现消息汇总整合
  • ¥50 关于#ui#的问题:做yolov8的ui界面出现的问题
  • ¥15 如何用Python爬取各高校教师公开的教育和工作经历
  • ¥15 TLE9879QXA40 电机驱动
  • ¥20 对于工程问题的非线性数学模型进行线性化
  • ¥15 Mirare PLUS 进行密钥认证?(详解)
  • ¥15 物体双站RCS和其组成阵列后的双站RCS关系验证
  • ¥20 想用ollama做一个自己的AI数据库
  • ¥15 关于qualoth编辑及缝合服装领子的问题解决方案探寻
  • ¥15 请问怎么才能复现这样的图呀