`

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
找了一上午,浪费我时间!!!怒!
分享到:
评论

相关推荐

    mybatisMapped报错 Statements collection does not contain value for

    mytabis 报错 Mapped Statements collection does not contain value for

    CRM在通用.doc

    上海通用是上海汽车工业(集团)总公司和美国通用汽车公司各投资50%组建而成的迄今为止我国最大的中美合资企业,总投资为15.2亿美元。共有冲压、车身、油漆、总装和动力总成五大车间。严格按照精益生产原则规划、...

    mybatis中的sql解析.md

    上篇文章说过,mybatis在执行sql语句的时候,通过id获取configuration中mappedStatements的 MappedStatement对象,每个MappedStatement对象对应着增删改查语句,也就是我们配置文件中增删改查标签配置或是注解@...

    MyBatis User Guide.rar

    Exploring Mapped SQL Statements . 7 A Note about Namespaces........... 8 Scope and Lifecycle .......... 9 Mapper Configuration XML 10 properties ........ 11 settings ............ 12 typeAliases...

    基于springboot+mybatis实现的外卖订餐系统源码+项目说明(毕设).zip

    Mapped Statements collection already contains value for com.m.dao.AdminDao.login at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType ...

    Thinking in Java 4th Edition

    Simpler print statements ..... 63 Using Java operators ........... 64 Precedence ........................... 64 Assignment .......................... 65 Aliasing during method calls ....... 66 ...

    iBATIS 帮助文档

    Mapped Statements.................................................................................................................18 Statement的类型.......................................................

    SQLAlchemy Documentation

    2.1.5 Create an Instance of the Mapped Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.1.6 Creating a Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ....

    Visual.Studio.Tools.for.Office.Using.C.Sharp.with.Excel.Word.Outlook.and.InfoPath.Sep.2005

    Copyright Praise for Visual Studio Tools for Office Microsoft .NET Development Series Titles in the Series About the Authors Foreword Preface Acknowledgments ...

    Visual.Studio.Tools.for.Office.Using.C.Sharp.with.Excel.Word.Outlook.and.InfoPath.Sep.2005.part2

    Copyright Praise for Visual Studio Tools for Office Microsoft .NET Development Series Titles in the Series About the Authors Foreword Preface Acknowledgments ...

    一个struts2的例子:彻底解决STRUTS2 错误There is no Action mapped for namespace / and action name login

    前几天在网上下载一个struts2的helloword的例子,那个作者也真够缺德的,搞个错误的程序,害得我查了一天的程序错误。 最后发现竟然是struts.xml被写成啦sturts.xml。 碰见这样的问题先鄙视下提供例子的作者, ...

    TCPMouseHook.v1.0.For.Delphi.4.5.6.7.Cracked

    Hooking into the Windows API is a complicated process and there are several techniques to achieve this.Microsoft recommends that the callback procedure for most hooks should reside within a DLL, this ...

    TCPKeyHook.v1.4.For.Delphi.4.5.6.7 Cracked

    Hooking into the Windows API is a complicated process and there are several techniques to achieve this.Microsoft recommends that the callback procedure for most hooks should reside within a DLL, this ...

    JLink_Windows_V648.zip

    DLL: Renesas RX: When connecting to locked RX devices via JTAG (does not affect FINE!), 16-byte IDCODE (OSIS) could be rejected even though the correct code was given. Fixed. DLL: Renesas S7G2: QSPI ...

    A pracitcal introduction to hardware software codesign

    2.1 The Need for Concurrent Models: An Example . . . . . . . . . . . . . . . . . . . . . . 33 2.1.1 Tokens, Actors, and Queues. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 ...

    微软内部资料-SQL性能优化2

    Assuming the page reference does not result in an access violation, a page fault can be either hard or soft. A hard page fault results in a read from disk, either a page file or memory-mapped file. A...

    acpi控制笔记本风扇转速

    _HID does not match the predefined PCI Root Bridge IDs, the _CID list (if present) is now obtained and also checked for an ID match. Implemented additional support for the PCI _ADR execution: up...

    EurekaLog_7.5.0.0_Enterprise

    31)..Fixed: Removed exported helper _462EE689226340EAA982C5E8307B3F9E function (replaced with mapped file) 32)..Changed: Descriptions of EurekaLog project options now list corresponding property names...

    free_and_open_source_software_for_development.pdf

    has not been well mapped. This book is about FOSS for Development (FOSS4D). We will focus on the Least Developed Countries (LDC's) and primarily on the African context. Most of the LDC's are in Africa...

    python3.6.5参考手册 chm

    PEP 526: Syntax for variable annotations PEP 515: Underscores in Numeric Literals PEP 525: Asynchronous Generators PEP 530: Asynchronous Comprehensions PEP 487: Simpler customization of class ...

Global site tag (gtag.js) - Google Analytics