通配符的匹配很全面, 但无法找到元素 'mvc:annotation-driven' 的声明
2016-03-10 12:16
369 查看
报错信息:通配符的匹配很全面, 但无法找到元素 'mvc:annotation-driven' 的声明
原因是:虽然在xml文件上方声明了mvc,但没有配置此声明对应的文件信息,正确配置如下:
<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"
xmlns:mvc="http://www.springframework.org/schema/mvc"
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
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd ">
意思就是,mvc声明用http://www.springframework.org/schema/mvc/spring-mvc.xsd这个文件来解析
原因是:虽然在xml文件上方声明了mvc,但没有配置此声明对应的文件信息,正确配置如下:
<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"
xmlns:mvc="http://www.springframework.org/schema/mvc"
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
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd ">
意思就是,mvc声明用http://www.springframework.org/schema/mvc/spring-mvc.xsd这个文件来解析
相关文章推荐
- HTML学习笔记(二)——文本元素
- 二叉排序树
- 从关系型数据库到非关系型数据库
- JDBC编程
- 微信
- 简单的异步HTTP服务端和客户端
- 欢迎使用CSDN-markdown编辑器
- 【python】GET请求与POST请求
- Problem C: 小数计算——结构体
- QPointer的使用浅析
- Android Volley完全解析(四),带你从源码的角度理解Volley
- 进程和线程的状态
- 《c语言全局变量的用法》
- vps选择
- Spring 实战 第二章 组装Bean
- Android ListView中加入Button导致ItemClick事件失效
- 复制构造函数:形参为const和nonconst的调用情形
- TCP和UDP
- PHP: CGI,FASTCGI,php-fpm,mod_php,mod_cgi,mod_fcgid
- Problem B: C语言习题 学生成绩输入和输出