`

Mapped Statements collection does not contain value for...

 
阅读更多
Spring整合mybatis main方法测试报错:
Exception in thread "main" java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for com.Product.dao.ProductMapper.getAllProduct
at org.apache.ibatis.session.Configuration$StrictMap.get(Configuration.java:593)
at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:393)
at org.apache.ibatis.binding.MapperMethod.setupCommandType(MapperMethod.java:160)
at org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:48)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:37)
at $Proxy9.getAllProduct(Unknown Source)
at com.Product.service.ProductService.getAllProduct(ProductService.java:16)
at com.Product.service.ProductService$$FastClassByCGLIB$$59bee94b.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)
 
错误原因:DAO层下xml里的namespace配置不正确或者干脆没有配置namespace
找了一上午,浪费我时间!!!怒!
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics