1、错误信息
no Result Maps were found for the Mapped Statement 'com.feng.mybatis.mapper.
2、对错mapper.xml文件对比
<mapper namespace="com.feng.mybatis.mapper.BookMapper">
<!--错误的配置:parameterType-->
<!--<select id="getBookById" parameterType="com.feng.mybatis.bean.Book">
select * from book where id=#{id}
</select>-->
<!--正确的配置:resultType-->
<select id="getBookById" resultType="com.feng.mybatis.bean.Book">
select * from book where id=#{id}
</select>
</mapper>
3、错误原因
本来因该配置resultType,结果配置成了parameterType