搭建Mybatis 出现 Error querying database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for mapper.BatchCustomer.findBatchCustomerOneToOne

  

Error querying database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for mapper.BatchCustomer.findBatchCustomerOneToOne
### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for mapper.BatchCustomer.findBatchCustomerOneToOne,

解决方法:

一般出现这个问题,是因为在SqlConfig.xml (Mybatis)的主配置文件中没有配置 mapper.xml 的路径,所以找不到 。导致的。

搭建Mybatis 出现   Error querying database.  Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for mapper.BatchCustomer.findBatchCustomerOneToOne

搭建Mybatis 出现   Error querying database.  Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for mapper.BatchCustomer.findBatchCustomerOneToOne

确实少配置mapper.xml 路径了。

 

如何防范这个低级错误:

   在准备创建mapper.xml之前,现在Mybatis 的主配置文件中先把这个路径配好,防止出现找不到的这种情况。

搭建Mybatis 出现 Error querying database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for mapper.BatchCustomer.findBatchCustomerOneToOne

上一篇:浏览器与android移动端视频互播技术实现


下一篇:有趣的安卓视频播放器(VideoView)