title: Configure SpringIO MultiPartFile Too Large Error
body: <p>Configuring a Spring.IO REST service with the following prevent file uploads greater than 1MB:</p>
  
  <pre><code>@Configuration
  @ComponentScan
  @EnableAutoConfiguration
  public class UploadConfig {
  
      @Bean
      MultipartConfigElement multipartConfigElement() {
          MultipartConfigFactory factory = new MultipartConfigFactory();
          factory.setMaxFileSize("1024KB");
          factory.setMaxRequestSize("1024KB");
          return factory.createMultipartConfig();
      }
  }
  </code></pre>
  
  <p>This works well for all uploads that are within this threshold. I would like to customize the response if the file is too large but and have not been able to determine how. At the moment a standard 401 response is returned.</p>
  
  <p>If anyone could point me in the right direction that would be appreciated.</p>