亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

Mapped Statements collection does not contain value哪位大神指導這是什么錯誤嗎

org.apache.ibatis.exceptions.PersistenceException:?

### Error querying database. ?Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for Message.getListDao

### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for Message.getListDao

at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)

at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:122)

at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:113)

at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:108)

at com.imooc.dao.ListDao.getListDao(ListDao.java:45)

at com.imooc.service.ListService.getListDao(ListService.java:18)

at com.imooc.service.ListService.main(ListService.java:22)

Caused by: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for Message.getListDao

at org.apache.ibatis.session.Configuration$StrictMap.get(Configuration.java:832)

at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:665)

at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:658)

at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:119)

... 5 more


正在回答

2 回答

確認xml文件沒有寫錯,那就是位置的問題了,這是老外的答案?

http://img1.sycdn.imooc.com//5ef1e99f0001526008800280.jpg

0 回復 有任何疑惑可以回復我~

映射語句集合不包含值,原因可能是

1.mybatis的映射文件的命令空間與接口的全限定名不一致;

2有可能mybatis的映射文件名字與接口的類名字不一致;

3.還有一種情況就是接口聲明的方法在映射文件里面沒有。


0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

Mapped Statements collection does not contain value哪位大神指導這是什么錯誤嗎

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號