伙伴云客服论坛»论坛 S区 S行业资讯 查看内容

0 评论

0 收藏

分享

项目发布时报错Type interface xxx is not known to the MapperRegistry.

今天在项目发布时报了下面的错误
项目发布时报错Type interface xxx is not known to the MapperRegistry.-1.jpg


Type interface org.fkjava.ecshop.mapper.ArticleTypeMapper is not known to the MapperRegistry.
处置方法:
在工具类的连接工厂中,初始化数据源里加一句sqlSessionFactory.getConfiguration().addMapper(ArticleTypeMapper.class);((ArticleTypeMapper即报错的xxx)
项目发布时报错Type interface xxx is not known to the MapperRegistry.-2.jpg


胜利处置问题!
上网查一下说这样处置并不是更好的,问题出在mybatis的配置文件缺失配置导致的。可以在配置文件中添加:
  1. <mappers><mapperresource="org/mybatis/builder/ArticleTypeMapper.xml"/></mappers>```
复制代码

回复

举报 使用道具

相关帖子
全部回复
暂无回帖,快来参与回复吧
本版积分规则 高级模式
B Color Image Link Quote Code Smilies

做心肺女
注册会员
主题 13
回复 15
粉丝 0
|网站地图
快速回复 返回顶部 返回列表