AMapper.xml的文件的内容如下:
<mapper namespace="com.*.*.mapper.*Mapper">
<resultMap id="BaseResultMap" type="">
<resultMap/>
</mapper>
如果BMapper.xml文件想的resultMap 想继承AMapper的resultMap ,则需要这样写:
<mapper namespace="com.*.*.mapper.*Mapper">
<resultMap id="BaseResultMap" type="" extends=“[AMapper的namespace].resultMap”>
<resultMap/>
</mapper>
重点是需要它的命名空间,跟本地路径有没有创建那些文件夹没关系
最后
以上就是重要柚子最近收集整理的关于mybatis resultMap标签使用extends的全部内容,更多相关mybatis内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复