使用注册中心时候出现的问题

  1. org.apache.ibatis.binding.BindingException:Invalid bound statement (not found): cn.e3mall.mapper.TbItemMapper.selectByPrimaryKey
  2. Invalid bound statement (not found): cn.e3mall.mapper.TbItemMapper.selectByPrimaryKey

出错原因:

mybatis的接口和映射文件不在同一个路径下面,服务器只找到了接口却没有找到映射文件(没找到实现类)。

这是项目的dao层结构

 在编译后在内存中发现只能找到接口类,却没有映射文件!!!!

修改方法:

在dao层组件的pom文件最后加入如下节点

重新发布项目,能成功返回json数据

猜你喜欢

转载自blog.csdn.net/weixin_41987553/article/details/81957759