namespace" 或The content of element type "mapper" must match "EMPTY"

必须为元素类型 "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即可

上一篇:position中多次用到了relative和absolute,能不能具体介绍一下这两者的区别?


下一篇:网站开发进阶(二十八)初探localStorage