Spring MVC multipartfile upload file Error Resolution

Source: Internet
Author: User

Org.springframework.beans.BeanInstantiationException:Could not instantiate Bean class [    Org.springframework.web.multipart.MultipartFile]: Specified class is an interface    Org.springframework.beans.BeanUtils.instantiateClass (beanutils.java:101) Org.springframework.web.bind.annotation.support.HandlerMethodInvoker.resolveModelAttribute (    handlermethodinvoker.java:762) Org.springframework.web.bind.annotation.support.HandlerMethodInvoker.resolveHandlerArguments (    handlermethodinvoker.java:356) Org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod (    handlermethodinvoker.java:171) Org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod (    annotationmethodhandleradapter.java:426) Org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle ( annotationmethodhandleradapter.java:414) Org.springframework.web.servlet.DispatcherServlet.doDispatch ( dispatcherservlet.java:790) Org.springfraMework.web.servlet.DispatcherServlet.doService (dispatcherservlet.java:719)    Org.springframework.web.servlet.FrameworkServlet.processRequest (frameworkservlet.java:644)    Org.springframework.web.servlet.FrameworkServlet.doPost (frameworkservlet.java:560) Javax.servlet.http.HttpServlet.service (httpservlet.java:646) Javax.servlet.http.HttpServlet.service (    httpservlet.java:727) Org.apache.tomcat.websocket.server.WsFilter.doFilter (wsfilter.java:52)    Org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal (characterencodingfilter.java:88)    Org.springframework.web.filter.OncePerRequestFilter.doFilter (onceperrequestfilter.java:76) Org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal ( opensessioninviewfilter.java:198) Org.springframework.web.filter.OncePerRequestFilter.doFilter ( onceperrequestfilter.java:76)

After 2 hours, and finally went to Baidu to see the great God said this error in the controller's multipartfile parameters before adding @requestparam can solve

Spring MVC multipartfile upload file Error Resolution

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.