必须为元素类型 "mapper" 声明属性 "namespace" 或The content of element type "mapper" must match "EMPTY"

 
  1.  
    <?xml version="1.0" encoding="UTF-8"?>
  2.  
    <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">
  3.  
    <mapper namespace = "com.introduce.Modle.User2">
  4.  
    <resultMap type="com.introduce.Model.User2" id="user2ResultMap">
  5.  
    <result property="name" column="name" />
  6.  
    <result property="age" column="age" />
  7.  
    <result property="sex" column="sex" />
  8.  
    </resultMap>
  9.  
    <select id="getUser2" resultMap="user2ResultMap">
  10.  
    <![CDATA[select * from User2 where name=#{name}]]>
  11.  
    </select>
  12.  
     
  13.  
    </mapper>

只需把<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">

这行中的两处config  改成mapper即可

namespace" 或The content of element type "mapper" must match "EMPTY"的更多相关文章

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

  2. The content of element type "configuration" must match "(properties?,settings?,typeAliases?,typeHandlers?,objectFactory?,objectWrapperFactory?,reflectorFactory?,plugins?,environments?,databaseIdProv

    在mybatis配置文件config.xml中报错: The content of element type "configuration" must match "(p ...

  3. The content of element type "configuration" must match "(properties?,settings?,typeAliases?,typeHandlers?,objectFactory?...

    <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE configuration PUBLIC & ...

  4. 【转】The content of element type "configuration" must match "(properties?,settings?,typeAliases?,typeHandlers?,objectFactory?...

    [转]The content of element type "configuration" must match "(properties?,settings?,typ ...

  5. The content of element type "package" must match "(result-types?,interceptors?...

    错误:“The content of element type "package" must match "(result-types?,interceptors?,de ...

  6. web.xml配置bug之提示The content of element type "web-app" must match "(icon?,display- name?,description?,distributable?,

    错误:配置web.xml时,出现红色叉叉,提示 The content of element type "web-app" must match "(icon?,disp ...

  7. The content of element type "beans" must match "(description?,(import|alias|bean)*)

    The content of element type "beans" must match "(description?,(import|alias|bean)*) - ...

  8. The content of element type "package" must match "(result-types?,interceptors?,default-interceptor-ref?,default-action-ref?,default-class-ref?,global- results?,global-exception-mappings?,action*)".

    报错 The content of element type "package" must match "(result-types?,interceptors?,def ...

  9. The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,context-param*,filter*,filter-mapping*,listener*,servlet*,servlet- mapping*,session-config?,mime-map

    修改了一下web.xml,加入了一个<filter>,然后就报这样的错??? The content of element type "web-app" must ma ...

随机推荐

  1. WPS--world使用格式刷

    1.在空白处左键点击一下即可出现格式刷

  2. 超详细的EM算法理解

    众所周知,极大似然估计是一种应用很广泛的参数估计方法.例如我手头有一些东北人的身高的数据,又知道身高的概率模型是高斯分布,那么利用极大化似然函数的方法可以估计出高斯分布的两个参数,均值和方差.这个方法 ...

  3. Spring Boot后台运行

    #!/bin/bash nohup java -jar -Dspring.profiles.active=prop app-0.0.1.jar > app.log 2>&1 &am ...

  4. 添加学生信息(java wb)

    要求: 1.登录账号:要求由6到12位字母.数字.下划线组成,只有字母可以开头: 2.登录密码:要求显示“• ”或“*”表示输入位数,密码要求八位以上字母.数字组成: 3.性别:要求用单选框或下拉框实 ...

  5. RestHighLevelClient 之 Scroll

    ES中默认最大查询结果为10000,大于10000时查不出结果,报错超过最大值,如把 from调到大于10000. 针对这个问题,有两种解决办法. 第一种,修改 max_result_window 很 ...

  6. 学习笔记:CentOS7学习之十九:Linux网络管理技术

    目录 学习笔记:CentOS7学习之十九:Linux网络管理技术 本文用于记录学习体会.心得,兼做笔记使用,方便以后复习总结.内容基本完全参考学神教育教材,图片大多取材自学神教育资料,在此非常感谢MK ...

  7. python的logging的配置

    在python项目中,开发环境是windows环境,发布环境是linux系统. import logging import logging.handlers import platform impor ...

  8. 【AtCoder】CODE FESTIVAL 2016 qual C

    CODE FESTIVAL 2016 qual C A - CF -- #include <bits/stdc++.h> #define fi first #define se secon ...

  9. Photon Server 实现注册与登录(四) --- 服务端响应登陆和注册

    前面已经整理过了服务端代码,MyGameServer.cs 和 ClientPeer.cs 对请求和响应进行了拆分.接下来处理对前端的响应 一.响应登陆请求 之前整理中,响应前端请求主要在类Clien ...

  10. Windows安全日志

    在运行中输入:eventvwr.msc,即可打开事件日志. 登录类型 描述 2 互动(键盘和屏幕的登录系统) 3 网络(即连接到共享文件夹从其他地方在这台电脑上网络) 4 批处理(即计划任务) 5 服 ...