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

来源:互联网 发布:确认密码 javascript 编辑:程序博客网 时间:2024/06/08 16:49
<?xml version="1.0" encoding="UTF-8"?>  <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">    <mapper namespace = "com.introduce.Modle.User2"><resultMap type="com.introduce.Model.User2" id="user2ResultMap"><result property="name" column="name" /><result property="age" column="age" /><result property="sex" column="sex" /></resultMap><select id="getUser2" resultMap="user2ResultMap"><![CDATA[select * from User2 where name=#{name}]]></select></mapper>



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

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

阅读全文
0 0
原创粉丝点击