报错信息:
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.zqf.wiki.mapper.TestMapper.list
查询网上总结有三种
1)mapper.xml中的namespace和实际的mapper文件不一致
2)mapper接口中的方法名和mapper.xml中的id标签不一致
3)可能没有构建进去,需要打开target看对应的mapper.xml文件是否存在,如果不在clean一下再启动
总之就是运行时无法自动匹配对应的xml文件
最后发现我的原因是SpringBoot配置文件里指定Mybatis的Mapper文件路径写错了
原来是多加了个s,以后一定要仔细仔细再仔细