最近一直用SpringMvc+Mybabis做项目,见同事一直报Type interface XXXMapper is not known to the MapperRegistry.这个错误,google了半天,网上的说法都是说Mapper xml中的namespace对应的实体类的路径不对,查看了半天一直找不到错误,debug了半天后来终于发现了问题,问题所在就是:我的项目依赖的有两个jar包,获取sqlSession的方式都是
InputStream inputStream = Resources.getResourceAsStream(config);
SqlSessionFactorysqlSessionFactory = new SqlSessionFactoryBuilder().build(inputStream);
getResourceAsStream中是MapperConfig的文件名,依赖的两个jar包各自有一个MapperConfig.xml,该文件中引入的xxxxmapper.xml不同,导致调用的时候只加载了一个MapperConfig.xml中的mapper.xml,对应的mapper没有注册到mybatis的MapperRegistry中所以会一直报Type interface XXXMapper is not known to the MapperRegistry.特此收录一把,仅供参考。
转载前请指明本文地址:http://anonymman.iteye.com/blog/2138316
相关推荐
在使用MyBatis框架进行开发时,我们可能会遇到这样的错误提示:“`xxxMapper is not known to the MapperRegistry`”。这个错误通常表示MyBatis无法找到你定义的Mapper接口,这可能是配置问题或者是类扫描的问题。...
gho封装教程,不错,讲述了怎么封装gho的,可以参考一下
Delphi's THandle type when a HWND is passed to a function. E.g.: if (DragDetectPlus(THandle(MyControl->Handle), Point(X, Y))) { ... } * Virtual File Stream formats can only be pasted from the ...
总之,解决“Name jdbc is not bound in this Context”错误的关键在于正确配置数据源,并在Java代码中使用JNDI查找数据源以获取数据库连接。理解并熟练掌握这些步骤对于开发基于Java Web的应用程序来说至关重要。
This book explains how to take full advantage of the revolutionary Oracle Wait Interface to quickly pinpoint--and solve--core problems and bottlenecks, and increase productivity exponentially.
编译通过的Inno setup Inno Setup consists of five projects: Compil32.dpr - This is the GUI front-end for the compiler....various structures and function declarations used to interface to the DLL.
pb连接SQLSERVER2005,提示如下错误:Unable to load the requested Database interface.Please make sure both the interface and client software are properly installed. 解决办法:下载ntwdblib.dll然后将其copy...
Note that unlike other application components, calls on to the IBinder interface returned here may not happen on the main thread of the process. More information about this can be found in Application...
Causes the next filter in the chain to be invoked, or if the calling filter is the last filter in the chain, causes the resource at the end of the chain to be invoked. doFilter(ServletRequest, ...
The core utilities, known as userland, provide the interface that identifies FreeBSD, both user interface, shared libraries and external interfaces to connecting clients. Currently, 162 people are ...
invalid interface type(解决方案).md
This book is written with two objective in mind, first, to introduce the reader to the concepts of programming using C#, second, to put into practice the concepts in a fun and entertaining way by ...
The Way to Go,: A Thorough Introduction to the Go Programming Language 英文书籍,已Cross the wall,从Google获得书中源代码,分享一下。喜欢请购买正版。 目录如下: Contents Preface......................
This document describes the structure of the Application Binary Interface (ABI) for the ARM architecture, and links to the documents that define the base standard for the ABI for the ARM Architecture...
goal here is not to rewrite the browser, but to give you the ability to retrieve, manipulate, and redistribute web-based information in an automated fashion. Who This Book Is For I like to think that...
SLPS.Matlab.Simulink.To.Pspice.Interface.v2.65.5.rar,用于Simulink.To.Pspice的联合仿真接口,能够实现系统级仿真,但需要Pspice 及matlab有相应的授权。
14. If the two ISPs do not peer with each other, then when they send traffic to each other they have to send the traffic through a provider ISP (intermediary), to which they have to pay for carrying ...
Beyond BIOS 第三版 Beyond.BIOS.Developing.with.the.Unified.Extensible.Firmware.Interface.3rd.Editio