各位大佬们,使用 struts2 上传文件,由于文件量过大,代码处理超过 5 分钟后会为什么会重新执行一次文件上传,请问这种情况怎么避免?是哪里的配置问题吗? 这里是我的 struts2 配置:
<action name="realFlyTimeAdjustUpload_*" method="{1}" class="com.ceair.retrospect.dealcount.jlcount.action.RealFlyTimeAdjustUploadAction"> <!-- 配置名字为 fileUpload 的拦截器 --> <interceptor-ref name="fileUpload"> <!-- 配置允许上传的文件类型 xls,xlsx --> <param name="allowedTypes">application/excel,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/octet-stream</param> <!-- 配置允许上传文件的大小(单位字节) --> </interceptor-ref> <interceptor-ref name="defaultStack"></interceptor-ref> <!-- 动态设置保存文件的路径 (Action 的属性值)--> <param name="savePath">/file/fileUpload/flightTime</param> <result name="uploadRealFlyTimeAdjust" type="freemarker">WEB-INF/content/jlcount/importRealFlyTimeAdjust.ftl</result> <result name="result" type="json"> <!-- IE 下导入完成 json 需以 text/heml 格式返回 否则一直要保存文件 --> <param name="contentType">text/html</param> <param name="root">resultMap</param> </result> </action>
![]() | 1 wysnylc 2019-12-16 12:11:34 +08:00 我穿越了 |
2 zhaoritian19 OP @wysnylc 怎么了…… |
![]() | 3 ihciah 2019-12-16 13:08:49 +08:00 via iPhone 多不怕死用 struts2 |
4 zhaoritian19 OP @ihciah 没办法啊 接手的旧的项目 |
5 wc951 2019-12-16 13:56:36 +08:00 via Android struts2 爆了那么多漏洞还有人在用吗 |