mybatis is not known to the MapperRegistry.

2025-10-23 18:48:06

1、将mybatis整合到项目中。

mybatis is not known to the MapperRegistry.

2、启动项目。访问错误信息如下图

mybatis is not known to the MapperRegistry.

3、问题排查:

1:先检查对应的mapper.xml文件的namespace是不是对应dao的全路径。

如下图:

mybatis is not known to the MapperRegistry.

4、如果检查1没问题。

坚持2:

先排查WEB.XML文件中配置的加载文件。

如下图:

mybatis is not known to the MapperRegistry.

5、找到对应的mybatis配置文件。

如下图:

mybatis is not known to the MapperRegistry.

6、将报错的mapper.xml文件配置到mybatis配置文件中。

如下图:

mybatis is not known to the MapperRegistry.

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢