title: Cannot configure CommonsMultipartResolver with Spring Boot 1.2.8
body: <p>I am trying to use <code>CommonsMultipartResolver</code> in my Spring Boot application. I cannot use the <code>StandardServletMultipartResolver</code>, as I want to handle exceptions (e.g. exceeding file size). </p>
  
  <p>I have set up a dependency to <code>commons-fileupload</code>. My spring configuration is:</p>
  
  <pre><code>    @Autowired
      private MultipartProperties multipartProperties = new MultipartProperties();
  
      @Bean
      public MultipartConfigElement multipartConfigElement() {
          return this.multipartProperties.createMultipartConfig();
      }
  
      @Bean
      public MultipartResolver multipartResolver() {
          LOG.debug("initializing MultipartResolver");
          CommonsMultipartResolver multipartResolver = new CommonsMultipartResolver();
          return multipartResolver;
      }
  
      @Bean
      public FilterRegistrationBean multipartFilterRegistrationBean() {
          final MultipartFilter multipartFilter = new MultipartFilter();
          final FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean(multipartFilter);
          multipartFilter.setMultipartResolverBeanName("multipartResolver");
          filterRegistrationBean.setOrder(OrderedHiddenHttpMethodFilter.DEFAULT_ORDER-1);
          return filterRegistrationBean;
      }
  </code></pre>
  
  <p>When I set up the <code>MultipartFilter</code> to be executed prior to the <code>HiddenHttpMethodFilter</code> I get an <code>IOException</code>:</p>
  
  <pre><code>Caused by: java.io.IOException: Missing content for multipart request
  at org.eclipse.jetty.util.MultiPartInputStreamParser.parse(MultiPartInputStreamParser.java:491)
  at org.eclipse.jetty.util.MultiPartInputStreamParser.getParts(MultiPartInputStreamParser.java:400)
  at org.eclipse.jetty.server.Request.getParts(Request.java:2139)
  at org.eclipse.jetty.server.Request.extractMultipartParameters(Request.java:385)
  ... 35 common frames omitted
  </code></pre>
  
  <p>Otherwise, I get an exception that the part parameter is not present in the request.</p>
  
  <p>I believe I need to disable the servlet 3.0 handling of multipart requests, but I cannot figure out how to do it in spring boot.</p>