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