Could not instantiate bean class [org.springframework.web.multipart.MultipartFile]: Specified class
来源:互联网 发布:java await notifyall 编辑:程序博客网 时间:2024/05/22 12:08
解决方案:在Controller的MultipartFile参数前面加上@RequestParam就解决了!
exception
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.web.multipart.MultipartFile]: Specified class is an interfaceorg.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:656)org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)javax.servlet.http.HttpServlet.service(HttpServlet.java:637)javax.servlet.http.HttpServlet.service(HttpServlet.java:717)org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
root cause
org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.web.multipart.MultipartFile]: Specified class is an interfaceorg.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:637)javax.servlet.http.HttpServlet.service(HttpServlet.java:717)org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.33 logs.
0 0
- Could not instantiate bean class [org.springframework.web.multipart.MultipartFile]: Specified class
- Could not instantiate bean class [org.springframework.web.multipart.MultipartFile]: Specified class
- Could not instantiate bean class [org.springframework.web.multipart.MultipartFile]: Specified class
- springmvc+fileuploader上传报错 Could not instantiate bean class [org.springframework.web.multipart.Multi
- Could not instantiate bean class [org.hibernate.cfg.Configuration]: Construct
- 错误:Could not instantiate bean class [java.util.List]: Specified class is an interface
- mybatis报错:Could not instantiate bean class [Dao.stuDao]: Specified class is an interface
- Could not instantiate bean class [javax.servlet.ServletContext]: Specified class is an interface
- Could not instantiate bean class [java.util.List]: Specified class is an interface
- NoClassDefFoundError: Could not initialize class org.springframework.web.client.RestTemplate
- springMVC接受list报错:Could not instantiate bean class [java.util.List]: Specified class is an interf
- SSH配置启动后Tomcat后报错:Could not instantiate bean class [org.hibernate.cfg.Configuration]
- Could not instantiate bean class [com.wms.web.action.inquiry.ItemQueryAction]: Constructor threw exc
- Failed to instantiate [org.springframework.data.domain.Pageable]: Specified class is an interface
- Failed to instantiate [org.springframework.data.domain.Pageable]: Specified class is an interface
- java.lang.NoSuchMethodException: [org.springframework.web.multipart.MultipartFile;.<init>()
- java.io.File 转 org.springframework.web.multipart.MultipartFile
- Spring MVC: org.springframework.web.multipart.MultipartException: Could not parse multipart servlet
- CSS 之Box-sizing 属性的使用方法
- 完全公平调度-cfs
- 网易游戏2011.10.15校园招聘笔试题
- Opencv学习笔记(背景更新---目标跟踪)
- 去除jsp执行后,网页源码中的空行
- Could not instantiate bean class [org.springframework.web.multipart.MultipartFile]: Specified class
- WebService学习笔记(二)服务端Demo
- JSP自定义标签扩展----支持EL,访问Spring容器
- Git使用教程
- Linux战地日记——历史命令
- jQuery 将网页中一个表格中的数据已行为最小单元添加到另外的一个表格当中
- 初识 Spring 框架,进入Spring的世界
- [企业管理]到了移动互联网泡沫破裂的时候了
- 如何判断程序是x86还是x64类型