2-10 验证controller 前面课程的测试都没问题
来源:1-3 Eclipse与maven的联合配置
hood218
2020-07-28
2-10 验证controller 前面课程的测试都没问题,到这里启动tomcat打开helloworld可以,但访问superadmin/listarea就不行,报错,求问怎么解决。查了挺多方法,这里直截取了严重
七月 28, 2020 10:23:38 上午 org.springframework.web.servlet.DispatcherServlet initServletBean
严重: Context initialization failed
org.springframework.beans.factory.BeanCreationException: 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
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:269)
2回答
-
hood218
提问者
2020-07-28
错误从下往上看,后来添加了
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.3</version>
</dependency>就解决了
10 -
hood218
提问者
2020-07-28
七月 28, 2020 10:19:49 上午 org.apache.catalina.loader.WebappClassLoader validateJarFile
信息: validateJarFile(D:\code_imooc\out\artifacts\o2o_war_exploded2\WEB-INF\lib\javax.servlet-api-3.1.0.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
[2020-07-28 10:19:51,336] Artifact o2o:war exploded2: Artifact is deployed successfully
每次都显示这个,我看网上说跟webinf中的lib冲突了,就把lib中的删了,发现还是报这个红色
012020-07-28
相似问题