今天在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".的更多相关文章

  1. Multiple annotations found at this line

    Multiple annotations found at this line 在使用MyEclipse的时候,通过MVN导入项目时候,webapp下面的JSP页面报了如下的错误: 这种情况通常的原因 ...

  2. Myeclipse10编写jsp时出现 Multiple annotations found at this line:

    今天,老师讲完课做了一个小练习,就是编写一个jsp页面.写完后,我发现少些了点东西,我准备使用<% %>添加是发现,报错了 Multiple annotations found at th ...

  3. 你的Jsp页面有黄×么,有黄色问号么?Multiple annotations found at this line: - Invalid location of tag (form). - No

    jsp页面有黄色问号代表我们的html标签不符合规范 对于很多人拿到页面美工给的页面,有时候很多都有黄色的问号. 为什么会这样呢? Multiple annotations found at this ...

  4. 网站开发进阶(十六)错误提示: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 出现以上错误,主要是由下 ...

  5. 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 ...

  6. maven pom文件报错:Multiple annotations found at this line 解决方案(转)

    研究maven多模块项目时,因为家里和公司不能同时开发,所以把家里搭建好的项目复制到公司继续研究, 当时家里的电脑搭建好项目之后是没问题的,但是复制到公司的eclipse上之后就看到pom文件出现下面 ...

  7. web.xml里报错:Multiple annotations found at this line:

    在web.xml 中添加错误页面配置,出现了这个报错 具体情况是这样的: 错误信息: Multiple annotations found at this line: - cvc-complex-ty ...

  8. 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" ...

  9. hibernate和mybatis出现配置文件xml的文件报错Multiple annotations found at this line(转)

    hibernate中的xml配置文件Multiple annotations found at this line,出现这个红叉报错,直接是把 <?xml version="1.0&q ...

随机推荐

  1. css固定姓名显示长度,排列更整齐

    white-space: nowrap 不换形 overflow: hidden 隐藏长度超出部分 text-overflow:ellipsis  文字长度超出用省略号代替 <p style=& ...

  2. C# 多线程详解 Part.01(UI 线程、子线程)

    基本概念 什么是进程?        当一个程序开始运行时,它就是一个进程,进程包括运行中的程序和程序所使用到的内存和系统资源.一个进程至少有一个主线程. 什么是线程?        线程是程序中的一 ...

  3. Redis入门(一)系统安装

    硬件环境:Thinkpad T450,Intel i5-5200U CPU @ 2.20GHz × 4 ,8GB RAM 软件环境: ubuntu 14.04.4 (trusty) 一.软件安装 #w ...

  4. wordpress google字体和gravatar头像不显示问题处理

    wordpress 安装好后,发现网站打开很慢. 查看原因后发现是因为总所周知的原因:google字体无法加载.gravatar头像无法加载. 在网上查了下,说是要把google字体加载连接修改下,和 ...

  5. js反射机制

    本文转载自:http://blog.csdn.net/liuzizi888/article/details/6632434 什么是反射机制反射机制指的是程序在运行时能够获取自身的信息.例如一个对象能够 ...

  6. Django中csrf错误

    CSRF(Cross-site request forgery)跨站请求伪造,也被称为“one click attack”或者session riding,通常缩写为CSRF或者XSRF,是一种对网站 ...

  7. [cross compile]cygwin和mingw

    转自:http://blog.csdn.net/embededvc/article/details/6829010 1. MinGW和CygWin/gcc概念 Unix下编译通过的C代码,在win32 ...

  8. 黄聪:Wordpress二级域名共享用户cookie出现错误解决方案及WP的Cookie机制

    在若干年以前,我刚开始折腾Wordpress没多久的时候,就自己摸索过 多个Wordpress网站共享一份数据表的实现方法 .这种看起来好像很高大上的类SSO功能,能够给用户在多个网站之间提供快速.无 ...

  9. bootstrap-面板、modal

    面板: <!-- panel 面板 panel-heading 面板头部 panel-title 面板标题样式 panel-body 面板内容 --> <div class=&quo ...

  10. Python基础篇【第2篇】: Python内置函数(一)

    Python内置函数 lambda lambda表达式相当于函数体为单个return语句的普通函数的匿名函数.请注意,lambda语法并没有使用return关键字.开发者可以在任何可以使用函数引用的位 ...