用Mybatis的时候爆错Type interface XXXXX is not known to the MapperRegistry.

梦里梦外; 2022-01-11 02:05 269阅读 0赞

错误:Type interface com.gx.mapper.YuangongMapper is not known to the MapperRegistry.
在这里插入图片描述

用Mybatis的时候爆出的一个错误,主要原因是Mappper.xml里面的namespace 和对应的接口地址不一样

在这里插入图片描述
在这里插入图片描述

最后在检查一下mybatis-config.xml配置文件的mapper属性是否指定了mapper配置文件

在这里插入图片描述

发表评论

表情:
评论列表 (有 0 条评论,269人围观)

还没有评论,来说两句吧...

相关阅读