我是春天的新手。我在我的 spring 应用程序中遇到了一个错误。它说 : GRAVE: Servlet [dispatcher] in web application [/web-customer-function] threw load() exceptionjava.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1309) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1137) at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:546)我已经处理这个问题很长时间了......已经 5 天了。这就是我所做的......部署程序集 > 将 lib 文件夹添加到路径停止、清理或/和删除服务器重写整个代码下载 org.springframework.web.servlet.DispatcherServlet 并尝试再次运行。如果可能的话,我将不胜感激。这是我的 Web.xml<?xml version="1.0" encoding="UTF-8"?><web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1"> <display-name>spring-mvc-crud-demo</display-name> <welcome-file-list> <welcome-file>index.jsp</welcome-file> <welcome-file>index.html</welcome-file> </welcome-file-list> <servlet> <servlet-name>dispatcher</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/spring-mvc-crud-demo-servlet.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>dispatcher</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping></web-app>这部分是我的 spring-crud.xml,它们是 bean 和配置......
1 回答

有只小跳蛙
TA贡献1824条经验 获得超8个赞
我把问题解决了...
谢谢大家的帮助,这让我再次思考。所以我从零开始重构代码检查了库,它运行顺利。所以问题出在库上,因为在重构代码后它不起作用。但是检查它工作的库。
添加回答
举报
0/150
提交
取消