解决org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)问题
解决org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)问题
需要检查的步骤:
1.是否mapper.java文件上使用了注解@Mapper 或者 在启动类上扫描了Mapper类 @MapperScan("com.heima.model.mappers") 【注意扫描的包名是否正确】
2.注意mapper.xml文件中的namespace是否正确指向到Mapper.java类的位置 【<mapper namespace="com.heima.model.mappers.app.ApUserArticleListMapper">】
3.注意被调用的方法名在mapper.java中和mapper.xml中的id保持一致性
4.注意mapper.xml方法的parameterType尽量指定全路径的domain
5.注意Mapper.java在被调用的地方需要注入@Autowired
6.最终,一定一定要注意你建立的mapper.xml是xml文件,因为你创建的file在idea上默认会被识别为xml文件的图标,即使你没有指明后缀!!!
————————————————
版权声明:本文为CSDN博主「Terence全栈开发」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_39997939/article/details/122279782
转:
解决org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)问题的更多相关文章
- IDEA异常解决: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
有时候解决问题不仅仅是解决问题.-----jstarseven 最近因为开发需要,需要搭建一个ssm开发框架,采用了开发工具IDEA. 整合完了SSM开发框架之后,发布的时候出现org.apache. ...
- 完美解决: org.apache.ibatis.binding.BindingException Invalid bound statement (not found)
异常描述: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 原因: springboot ...
- 解决 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 以及MyBatis批量加载xml映射文件的方式
错误 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 的出现,意味着项目需要xml文件来 ...
- 解决org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.xyfer.dao.UserDao.findById
在使用Spring整合MyBatis的时候遇到控制台报错:org.apache.ibatis.binding.BindingException: Invalid bound statement (no ...
- 解决org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)...
在IDEA中将xxxMapper.xml文件创建在(src/main/java)目录中,运行报错:org.apache.ibatis.binding.BindingException: Invalid ...
- 解决org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)错误
我调这个bug调了一天多,在网上搜索的检查namespace,package等,都没有错.错误提示是没有找到xml文件,我就纳闷了,为什么找不到呢?后来才发现,原来是resource中奇怪的目录为题, ...
- Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement
原因: 此异常的原因是由于mapper接口编译后在同一个目录下没有找到mapper映射文件而出现的.由于maven工程在默认情况下src/main/java目录下的mapper文件是不发布到targe ...
- Java报错:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.sirifeng.babytun.dao.GoodsDAO.findById
前言 最近学vue学得差不多了,想来搭个项目实战一下,结果刚开始搭建SSM框架的时候就来到了我们最喜欢的debug环节 org.apache.ibatis.binding.BindingExcepti ...
- MyBatis笔记----报错:Exception in thread "main" org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)解决方法
报错 Exception in thread "main" org.apache.ibatis.binding.BindingException: Invalid bound st ...
- maven 项目报错org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)解决
idea在使用maven构建的项目中使用mybatis时报错org.apache.ibatis.binding.BindingException: Invalid bound statement (n ...
随机推荐
- 造个Python轮子,实现根据Excel生成Model和数据导入脚本
前言 最近遇到一个需求,有几十个Excel,每个的字段都不一样,然后都差不多是第一行是表头,后面几千上万的数据,需要把这些Excel中的数据全都加入某个已经上线的Django项目 这就需要每个Exce ...
- gRPC(Java) keepAlive机制研究
基于java gRPC 1.24.2 分析 结论 gRPC keepAlive是grpc框架在应用层面连接保活的一种措施.即当grpc连接上没有业务数据时,是否发送pingpong,以保持连接活跃性, ...
- TortoiseGit间接处理linux目录下的仓库,用到window映射linux目录方案
原始需求 习惯用TortoiseGit查看git仓库信息和历史日志,但这个工具只支持window,我希望linux也能用 虽然有其他linux的GUI的git工具,但我用到的linux基本都是无界面版 ...
- 还在手撸TCP/UDP/COM通信?一个仅16K的库搞定!
摘要 在一些项目中,可能会用到串口(COM)通信,也可能会使用TCP-Server,TCP-Client,UDP等等,这种实现起来都大差不差,所以我封装了一个无任何依赖小而美的通信框架,通用性强,安全 ...
- C++初阶(vector容器+模拟实现)
迭代器 四种迭代器 容器类名::iterator 迭代器名;//正向迭代器 容器类名::const_iterator 迭代器名;//常量正向迭代器,const修饰,只能用于读取容器内的元素,不能改变其 ...
- 使用 Bytebase 管理 Rainbond 上的应用数据库
在应用的发布过程中数据库的结构变更一直是最复杂也是风险最大的环节,而 Bytebase 可以对这一过程进行全生命周期的管理.在 Rainbond 中安装 Bytebase,轻松管理部署在 Rainbo ...
- Python爬虫爬取彼岸网4K Picture
深夜爬取4k图片 下载流程 定义page_text函数,对第一页地址发送get请求,因为页面数据在页面源代码都能查到,所以发送get 请求就ok!,注意:要进行编码格式设置,可以去源代码查看, 定义p ...
- 使用python玩转二维码!速学速用!⛵
作者:韩信子@ShowMeAI Python3◉技能提升系列:https://www.showmeai.tech/tutorials/56 本文地址:https://showmeai.tech/art ...
- Go 每日一库之 go-carbon,优雅的golang日期时间处理库
Carbon 是一个轻量级.语义化.对开发者友好的 golang 时间处理库,支持链式调用. Carbon 已被 awesome-go 收录, 如果您觉得不错,请给个 star 吧. github.c ...
- DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead
// 引入mongoose模块 const mongoose = require('mongoose'); // 链接数据库 mongoose.set('useCreateIndex', true) ...