Multiple annotations found at this line: - The content of element type "mapper" must match "EMPTY". - Attribute "namespace" must be declared for element type "mapper".
今天在mybatis的mapper映射配置文件中遇到了这样的问题,困扰了我3个小时:
Multiple annotations found at this line:
- The content of element type "mapper" must match "EMPTY".
- Attribute "namespace" must be declared for element type
"mapper".
代码如下:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd">
<mapper namespace="com.ckx.entity.User">
</mapper>
第四行mapper标签一直报错!找不到问题原因,也百度尝试了百家学说,终无成就。无奈改了下表头格式如下:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ckx.entity.User">
</mapper>
毛主席万岁!问题解决了!可为什么有什么不一样吗?
这个放原因在于头部的医用错误 :
http://mybatis.org/dtd/mybatis-3-mapper.dtd
Multiple annotations found at this line: - The content of element type "mapper" must match "EMPTY". - Attribute "namespace" must be declared for element type "mapper".的更多相关文章
- Multiple annotations found at this line
Multiple annotations found at this line 在使用MyEclipse的时候,通过MVN导入项目时候,webapp下面的JSP页面报了如下的错误: 这种情况通常的原因 ...
- Myeclipse10编写jsp时出现 Multiple annotations found at this line:
今天,老师讲完课做了一个小练习,就是编写一个jsp页面.写完后,我发现少些了点东西,我准备使用<% %>添加是发现,报错了 Multiple annotations found at th ...
- 你的Jsp页面有黄×么,有黄色问号么?Multiple annotations found at this line: - Invalid location of tag (form). - No
jsp页面有黄色问号代表我们的html标签不符合规范 对于很多人拿到页面美工给的页面,有时候很多都有黄色的问号. 为什么会这样呢? Multiple annotations found at this ...
- 网站开发进阶(十六)错误提示:Multiple annotations found at this line:- basePath cannot be resolved to a variable
错误提示:Multiple annotations found at this line: basePath cannot be resolved to a variable 出现以上错误,主要是由下 ...
- eclipse报错:Multiple annotations found at this line: - String cannot be resolved to a type解决方法实测
Multiple annotations found at this line:- String cannot be resolved to a type- The method getContext ...
- maven pom文件报错:Multiple annotations found at this line 解决方案(转)
研究maven多模块项目时,因为家里和公司不能同时开发,所以把家里搭建好的项目复制到公司继续研究, 当时家里的电脑搭建好项目之后是没问题的,但是复制到公司的eclipse上之后就看到pom文件出现下面 ...
- web.xml里报错:Multiple annotations found at this line:
在web.xml 中添加错误页面配置,出现了这个报错 具体情况是这样的: 错误信息: Multiple annotations found at this line: - cvc-complex-ty ...
- jsp页面提示“Multiple annotations found at this line: - The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path”解决方案
Multiple annotations found at this line: - The superclass "javax.servlet.http.HttpServlet" ...
- hibernate和mybatis出现配置文件xml的文件报错Multiple annotations found at this line(转)
hibernate中的xml配置文件Multiple annotations found at this line,出现这个红叉报错,直接是把 <?xml version="1.0&q ...
随机推荐
- 工具第二天 cocoaPods 私有库的创建
之前介绍了cocoaPods的安装与使用,今天简单谈一下 自己的私有库运用cocoaPods依赖. cd到需要做库的工程目录下 创建一个podspec文件 创建:pod spec create 名称 ...
- Yii2 AR find用法 (2016-05-18 12:06:01)
Yii2 AR find用法 (2016-05-18 12:06:01) 转载▼ User::find()->all(); 返回所有数据 User::findOne($id); ...
- POJ-2726-Holiday Hotel
Holiday Hotel Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 8302 Accepted: 3249 D ...
- phoenix创建二级索引
create table user (id varchar primary key, firstname varchar, lastname varchar); create index user_i ...
- Hadoop学习19--推测式执行
所谓推测式执行,就是计算框架判断,如果有一个task执行的过慢,则会启动备份任务,最终使用原任务+备份任务中执行较快task的结果.产生原因一般是程序bug.负载倾斜. 那么这个较慢,是怎么判断的呢? ...
- RestTemplate
RestTemplate是Spring提供的用于访问Rest服务的客户端,RestTemplate提供了多种便捷访问远程Http服务的方法,能够大大提高客户端的编写效率.调用RestTemplate的 ...
- ORM框架
半自动:iBATIS是一个半自动化的ORM框架,需要通过配置方式指定映射SQL语句 全自:由框架本身生成(如Hibernate自动生成对应SQL来持久化对象),即Hibernate属于全自动ORM框架 ...
- android studio This client is too old to work with the working copy at
http://www.cnblogs.com/maijin/archive/2013/01/09/2852330.html http://stackoverflow.com/questions/283 ...
- 如何查看oracle数据库告警日志
目标:查看alert日志 su - oracle cd $ORACLE_BASE/diag/rdbms/LXY/LXY/trace tail -100f alert_LXY.log 我的ORACLE_ ...
- 阿里 classloader
http://blog.csdn.net/scythe666/article/details/51956047