像下面这个异常提示:
org.springframework.web.multipart.MultipartException: Could not parse multipart servlet request; nested exception is java.lang.IllegalStateException: org.apache.tomcat.util.http.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (45372783) exceeds the configured maximum (1048576)
MultipartException IllegalStateException SizeLimitExceededException
之间是什么关系?
MultipartException为springmvc封装的异常,抛出这个异常的原因在于产生了IllegalStateException,而产生IllegalStateException的原因是抛出了SizeLimitExceededException,这个异常产生的原因是你的请求上传内容大小超过了你配置的参数,如果服务器是tomcat的话,可以在server.xml中配置 maxPostSize这个参数,配置为0代表没有大小限制