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

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()