【MyBatis 】Mybatis中的resultType与resultMap

(自己的理解)

resultType

resultMap

<!--查询作者-->
<select id="selectAuthor" resultMap="authorResult">
    SELECT
        id,
        username,
        nickname,
        birthday,
        register_time
    FROM 
        author
    WHERE 
         id = #{id}
</select>
<!--作者结果映射-->
<resultMap id="authorResult" type="Author">
    <id property="id" column="id"/>
    <result property="registerTime" column="register_time"/>
</resultMap>           
原文地址:https://www.cnblogs.com/CESC4/p/6878520.html