报错:Could not parse multipart servlet request; nested exception is java.lang.IllegalStateException: The multi-part request contained parameter data (excluding uploaded files) that exceeded the limit for maxPostSize set on the associated connector。
原因:该问题由于post请求中参数中一个的大小超过了httpPostSize的默认大小。然后跟踪源码,发下Connector的默认的大小如如下所示:
。
2097152字也就2M,而传过去的参数大小有4M,所以导致该错误的发生。
解决方案:手动修改Connector的maxPostSize的大小为1024000000。如图:
重新请求后该问题解决。