mybatis+pg常见错误

Exception in thread "main" org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for mapper.selectOne1
### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for mapper.selectOne1

解决办法:

 

selectOne(a,b)函数中   a为mapper.xml中的namespace+所选的id      b为传入的参数

其余可能的错误为mapper.xml中方法与namespace文件中方法不一致

 

posted @ 2020-07-15 11:31  wangssd  阅读(430)  评论(0编辑  收藏  举报