我有一个表格:
<form:form modelAttribute="zgImport" action="${importAfterValidationUsers}" method="POST" name="ImportForm" >
我在其中显示 csv 内容(每个用户一行)。 我的 Controller 方法获取对象:
public void importAfterValidationUsers(@ModelAttribute ("zgImport") ZgImport zgImport, ActionRequest request, ActionResponse response) {
问题是:如果我有很多行(超过 670 行),我在 Controller 中获得的对象“zgImport”没有完全归档,我会丢失一些数据。 POST有限制吗?还是用映射?
最佳答案
POST 请求体大小通常受服务器限制,可以配置。
The maximum size in bytes of the POST which will be handled by the container FORM URL parameter parsing. The limit can be disabled by setting this attribute to a value less than or equal to 0. If not specified, this attribute is set to 2097152 (2 megabytes).
来源:https://tomcat.apache.org/tomcat-5.5-doc/config/http.html
关于spring - spring MVC POST 表单的大小限制?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30077145/