临时文件存储上传报错Error creating bean with name ******: Failed to introspect bean class
2020-07-16 05:57
706 查看
今天练习写临时存储上传的时候,
一直报错这个,看了错误提示,才发现可能是我没有引入依赖包
Error creating bean with name 'multipartResolver': Failed to introspect bean class [org.springframework.web.multipart.commons.CommonsMultipartResolver] for lookup method metadata: could not find class that it depends on; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileItemFactory
解决方法:
加入依赖包
<dependency> <groupId>commons-fileupload</groupId> <artifactId>commons-fileupload</artifactId> <version>1.3.1</version> </dependency> <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>2.4</version> </dependency>
两者看看有没有缺依赖包,对你有帮助的话,不妨点个赞!
相关文章推荐
- Error creating bean with name 'multipartResolver': Failed to introspect bean class [org.springframew
- failed; nested exception is java.lang.IllegalStateException: Failed to introspect bean class [com.pu
- Error creating bean with name 'jsonMessageConverter': Failed to introspect bean class [org.springfr
- 上传文件失败 Failed to load resource: the server responded with a status of 413 (Request Entity Too Large)
- 如何解决git上传文件出错[rejected] master -> master (fetch first) error: failed to push some refs to '
- Spring Boot升到2.2.6后Multipart文件上传出问题 Failed to parse multipart servlet request
- SpringBoot 上传文件突然报错 Failed to parse multipart servlet request; nested exception is java.io.IOException: The temporary upload location [/tmp/tomcat.1428942566812653608
- Android上传文件 报java.net.SocketException: sendto failed: EPIPE (Broken pipe)
- jsp项目文件运行出现java.lang.ClassNotFoundException和Failed to load or instantiate TagExtraInfo class异常
- php上传文件时出现错误:failed to open stream: Permission denied
- vsphere client 上传文件:Failed to log into NFC Server
- Caused by: java.lang.IllegalStateException: Failed to introspect Class from ClassLoader
- Failed to load or instantiate TagExtraInfo class: org.apache.struts.taglib.bean.CookieTei
- springboot 启动报错 java.lang.IllegalStateException: Failed to introspect annotated methods on class org
- Linux解决问题篇——ftp上传文件(使用put)时,permission denied,下载文件(使用get)时,failed to open file
- Failed to load or instantiate TagExtraInfo class: org.apache.struts.taglib.bean.CookieTei
- org.apache.jasper.JasperException: Failed to load or instantiate TagExtraInfo class: org.apache.struts.taglib.bean.CookieTei错误解决方法。
- Failed to introspect Class [org.springframework.cloud.netflix.hystrix.HystrixCircuitBreakerConfigura
- Failed to introspect annotated methods on class org.springframework.boot.web.support.SpringBootServl
- jar文件运行时:Failed to load Main-Class manifest attribute from ......解决办法