美文网首页
MyBatis使用的问题总结

MyBatis使用的问题总结

作者: zxk175 | 来源:发表于2017-02-26 11:39 被阅读154次
1.Result Maps collection already contains value for BaseResultMap

原因:MybatisGenerator在生成Mapper.xml文件时,会在原来基础上再生成,导致内容重复
解决方案:将所有的xml文件删除, 重新生成xml, 注释掉MyBatisGenerator Maven Plugin的插件引用

2.Error selecting key or setting result to parameter object

原因:可能是xml文件的sql语句包含";"
解决方案:将xml文件的";"删除

3.BaseResultMap is ambiguous in Result Maps collection

原因:暂不明确
解决方案:将查询语句的"*",换成具体列名

相关文章

网友评论

      本文标题:MyBatis使用的问题总结

      本文链接:https://www.haomeiwen.com/subject/ihyowttx.html