title: How to resolve FileSizeLimitExceededException error?
body: <p>I'm getting error while uploading excel file size is more the 1MB.</p>
  
  <pre><code>[org.springframework.web.multipart.MultipartException: Could not parse multipart servlet request;
   nested exception is java.lang.IllegalStateException: org.apache.tomcat.util.http.fileupload.FileUploadBase$FileSizeLimitExceededException:
   The field files exceeds its maximum permitted size of 1048576 bytes.]
  </code></pre>
  
  <p>I tried to fix it by applying the following config changes but none of them help me.</p>
  
  <p>Try with configuration in <code>application.yml</code> file : </p>
  
  <pre><code>spring:
        http:
           multipart:
               max-file-size:5MB
               max-request-size:5MB
  </code></pre>
  
  <p>And also I've tried the below annotation:</p>
  
  <pre><code>@MultipartConfig(fileSizeThreshold=1024*1024*10,maxFileSize=1024*1024*10,maxRequestSize=1024*1024*10)
  </code></pre>
  
  <p>And last I made this change: </p>
  
  <pre><code>&lt;Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443" maxSwallowSize="-1"   /&gt;
  </code></pre>
  
  <p>But nothing does work !</p>