找不到springMVC.xml

启动Tomcat运行项目报错:

 

 

 提示找不到类路径资源。异常为 SAXParseException。

原因:头文件配置不正确。缺少对于spring-context的头文件引用。

解决方法:直接复制以下内容到头文件标签。

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
posted @ 2022-02-13 16:49  XJJ12138  阅读(264)  评论(0)    收藏  举报