【mybatis】Mapped Statements collection does not contain value for

异常原因:没有将mapper文件配置到mybatis框架中, 导致找不到mapper中id为insertTransOutLackByBatchCode的语句

看下面的异常信息,红色部分 

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:

### Error updating database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for apollo.erp.dao.oracle.impl.TransportOutLackDDaoImpl.insertTransOutLackByBatchCode

### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for apollo.erp.dao.oracle.impl.TransportOutLackDDaoImpl.insertTransOutLackByBatchCode

at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:73)

at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:364)

at $Proxy11.insert(Unknown Source)

at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:236)

at apollo.erp.dao.oracle.impl.TransportOutLackDDaoImpl.insertTransOutLackByBatchCode(TransportOutLackDDaoImpl.java:27)

at apollo.erp.mvc.manager.TransportOutMManager.saveLackInfo(TransportOutMManager.java:175)

at apollo.erp.mvc.manager.TransportOutMManager.changeTransportOutM(TransportOutMManager.java:156)

at apollo.erp.mvc.service.impl.DispatchMVCServiceImpl.saveTicketDetail(DispatchMVCServiceImpl.java:215)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

你可能感兴趣的:(开发中遇到的问题)