Error code:
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)
Solution: Add @RequestParam in front of the Controller’s MultipartFile parameter to solve it!
Read More:
- How to Solve Svn upload so File Error
- How to Solve MVC Error: Build failed.
- [Solved] Spring MVC Error: A child container failed during start
- How to Solve Arxiv Upload with PDFLatex Error
- How to Solve AOP error in Spring
- How to Solve the jump error after Spring Security Login
- How to Solve Spring Cloud Error context has been closed already
- How to Fix Error when integrating spring cloud openfeign with spring cloud Alibaba
- Spring boot uses configuration interface webmvcconfigurer to solve cross domain problems
- How to Solve Clickhouse restart error: Cannot obtain value of path from config file…
- How to Solve dtd Error in MybatisGenerator.xml file
- [Solved] Spring cloud load balancing, error: no instances available for localhost
- How to Solve Loadrunner Error: Failed to find .cfg file
- How to Solve Pydicom Read Dicom File Error: OSError
- How to Solve Error:cannot open source file “QtWidgets/QMainWindow”
- The Ajax return value reports an error, and the spring boot development Ajax return value reports an error
- How to Solve Hadoop Missing Hadoop.dll and winutils.exe file error
- How to Solve Azkaban Error Chung during uploading files to DB
- [Solved] Spring cloud config server can’t parse the YML file of the remote warehouse, and it will also report an error
- How to Solve Error: Type mismatch: cannot convert from Object to Car