我正在编写Spring MVC并遇到以下错误:
18:34:44,999警告[org.springframework.web.context.support.XmlWebApplicationContext](MSC服务线程1-1)上下文初始化期间遇到异常-取消刷新尝试:org.springframework.beans.factory.BeanCreationException:创建bean时出错名称为“ org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping#0”:Bean初始化失败;嵌套的异常是org.springframework.beans.factory.CannotLoadBeanClassException:找不到在ServletContext资源[/WEB-INF/FetchDevice-servlet.xml]中定义的名称为'scopedTarget.requestscope'的bean的类[com.icumed.beans.RequestInterfaceImpl]。 ; 嵌套的异常是java.lang.ClassNotFoundException:com.icumed.beans.RequestInterfaceImpl,来自[Module“ deployment.6.BeanScopingRequestSession.war:
我的目录结构:
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
<display-name>ICUMED-Req-Session-scope</display-name>
<servlet>
<servlet-name>FetchDevice</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>FetchDevice</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<listener>
<listener-class>
org.springframework.web.context.request.RequestContextListener
</listener-class>
</listener>
</web-app>
Smart猫小萌
相关分类