java - 找不到 BeanDefinitionParser
问题描述
我在使用 mvc:resources 映射资源时遇到问题。我收到以下错误:Cannot locate BeanDefinitionParser for element [resources] Offending resource: ServletContext resource [/WEB-INF/spring-servlet.xml]
我正在使用 Spring 3.2.3 和 Eclipse。spring-webmvc.jar 在构建路径上。我相信我的架构设置正确。如果有人可以提供帮助,我将不胜感激。谢谢!
<beans
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.2.xsd">
解决方案
解决了。原来这是一个罐子冲突。构建路径中有多个挥之不去的 org.springframework.*.3.0.1 jar。一旦我删除了这些,它就起作用了。
推荐阅读
- neo4j - 未知函数'algo.getNodeById'
- git - 如何从“git branch --list”的索引处获取特定的分支名称
- android - Firebase ListView 搜索功能实现Android
- r - 是否可以在使用闪亮包制作自己的仪表板以进行可视化时添加自己的 csv 或 txt 文件
- python-3.x - 在不阻塞的情况下使用 Tornado 的 data_received 方法需要什么特别的东西吗?
- ms-access - 主窗体刷新后 MS Access 子窗体变为空白
- ruby - 读取带有双引号和单引号变量的 CSV 文件
- cassandra - cassandra中每个节点有多少个分区是合适的
- amazon-web-services - 如何在 AWS 云中部署 Angular 4 和 Spring Boot 微服务应用程序?
- amazon-web-services - Presto - 从未嵌套列中选择所有列以及常规列