springboot整合mybatis:

mybatis 绑定失败:IInvalid bound statement (not found): com.dream.mapper.UserMapper.queryUserList 错误信息如下 (在网上找了很多的资料都没有用)
【springboot学习笔记三】springboot整合mybatis:Invalid bound statement (not found): com.*.*.*.querylist()
解决方法在最下面,亲测有效

对自己学习SpringBoot做个总结
对于上面这个**Invalid bound statement (not found)**问题,很多博客都是千片一律,写的解决方案都不亲自测试一下,列如:

【springboot学习笔记三】springboot整合mybatis:Invalid bound statement (not found): com.*.*.*.querylist()
【springboot学习笔记三】springboot整合mybatis:Invalid bound statement (not found): com.*.*.*.querylist()
【springboot学习笔记三】springboot整合mybatis:Invalid bound statement (not found): com.*.*.*.querylist()

我说的话可能会引起某些人的反驳,但这就是事实

先看错误之前我的项目结构以及运行错误

【springboot学习笔记三】springboot整合mybatis:Invalid bound statement (not found): com.*.*.*.querylist()
【springboot学习笔记三】springboot整合mybatis:Invalid bound statement (not found): com.*.*.*.querylist()
这个问题困扰了我一晚上,通过看springboot的一些文档,springboot在整合mybatis时java文件下的mapper接口要和resources文件下mapper.**.xml,路径一下要一样,没有为什么,这是springboot的规则!

更改一下xml配置文件的位置,你会发现问题迎刃而解
【springboot学习笔记三】springboot整合mybatis:Invalid bound statement (not found): com.*.*.*.querylist()
浏览器运行,能正常查询用户信息
【springboot学习笔记三】springboot整合mybatis:Invalid bound statement (not found): com.*.*.*.querylist()

相关文章:

  • 2021-11-30
  • 2021-04-27
  • 2022-01-22
  • 2021-05-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-12
猜你喜欢
  • 2022-12-23
  • 2021-12-12
  • 2021-07-08
  • 2021-04-15
  • 2022-01-04
  • 2021-09-23
  • 2022-12-23
相关资源
相似解决方案