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即可

相关文章:

  • 2021-11-27
  • 2021-11-29
  • 2021-06-09
  • 2022-12-23
  • 2021-12-26
  • 2022-12-23
  • 2021-10-16
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-23
  • 2021-06-09
  • 2021-07-22
  • 2022-01-30
相关资源
相似解决方案