首页 > 代码库 > Tomcat 发布war包提示war包超出大小修改

Tomcat 发布war包提示war包超出大小修改

error信息:

java.lang.IllegalStateException: org.apache.tomcat.util.http.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (55916489) exceeds the configured maximum (52428800)
原因:war包超出了上线50MB
修改方法:
tomcat/webapps/manager/WEB-INF/web.xml里面
    1.   <multipart-config
    2.     <!-- 50MB max --> 
    3.     <max-file-size>52428800</max-file-size
    4.     <max-request-size>52428800</max-request-size
    5.     <file-size-threshold>0</file-size-threshold
    6.   </multipart-config
    7. </servlet
    8. <servlet>
  1. 默认是50MB,修改其大小,重启服务即可。