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
找了一上午,浪费我时间!!!怒!

猜你喜欢

转载自wz510541136.iteye.com/blog/1821376
今日推荐