springboot invalid bound statement (not found)终极解决办法
解决org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)问题
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)问题,即在mybatis中dao接口与mapper配置文件在做映射绑定的时候出现问题,简单说,就是接口与xml要么是找不到,要么是找到了却匹配不到。
常见错误
- Mapper.xml文件中的namespace 路径错误 导致映射不到
- Mapper.xml中定义的每个statement的id错误 导致映射不到
- parameterType 路径错误 导致映射不到
- resultType的类型相同 路径错误 导致映射不到
以上都不是的话,可能是*.xml没有被处理到。
在系统文件夹查看 项目里的编译文件 target 中是否有映射的xml文件。
没有 ?
解决:maven 问题 pom 中 加上
<build><resources><resource><directory>src/main/java</directory><includes><include>**/*.xml</include></includes><filtering>true</filtering></resource></build>
然后 clean 项目
继续报错:
将映射的xml 文件放到映射的Java文件夹内,不报错。就说明 mapper 文件夹没被处理
解决:在 application.yml 加上
mybatis:mapper-locations: xx/xxxx/xx/mapping/*.xmltype-aliases-package: xx/xxxx/xxx/entity
springboot invalid bound statement (not found)终极解决办法相关推荐
- Invalid bound statement (not found) 终极解决办法
网上已经有很多文章说明可能导致这个报错的原因,无非是以下几种: 1.检查xml文件的namespace是否正确 2.Mapper.java的方法在Mapper.xml中没有,然后执行Mapper的方法 ...
- springboot报错Invalid bound statement (not found) 的解决办法
1.经排查所有的配置都没有问题,最后发现是项目编译后target文件夹中没有加载映射文件,解决方案,在pom中加入以下配置(但是这种方案一般要求在创建项目时就在pom中加入): <build&g ...
- Invalid bound statement (not found)错误解决办法
SpringBoot在整合mybatis的mapper文件时容易出现的一个问题.今天由于想把原先放在resource目录下的mapper目录放到java目录中,修改了下mapper路径,结果报出了这个 ...
- IDEA+Maven+Springboot:invalid bound statement (not found) 解决办法
自己使用Springboot搭建web项目,之前都是使用注解形式来执行sql获取查询内容,这次本承着闲得无聊试一试的想法,突发奇想想用xml的方式执行sql.很走心的参照自己之前spring项目的书写 ...
- springBoot:Invalid bound statement (not found): com.hry.seckill.mapper.GoodsMapper.getGoodsVoList
在学习springBoot做秒杀项目的时候遇到了 " Invalid bound statement (not found): com.hry.seckill.mapper.GoodsMap ...
- Invalid bound statement (not found)异常解决
问题描述以及解决思路: 1.我这里用的若依微服务框架 2.新建一个user模块ruoyi-user 3.启动后报错mapper映射有问题Invalid bound statement (not fou ...
- BindingException: Invalid bound statement (not found) 已解决
问题: SSM框架:整合spring和Mybatis过程中遇到了问题 Caused by: org.apache.ibatis.binding.BindingException: Invalid bo ...
- (解决)org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)问题的办法
1.基础办法:先检查mapper和xml的本身的对应关系是否正确(包括路径指向,方法名,包名对应是否正确),如果使用的是idea可以借助插件MybatisPlugin,能连接到指定方法说明绑定是没有问 ...
- 错误Invalid bound statement(not found):xxx问题解决办法
错误分析: teget目录下面的userDao.xml文件应该放在userDao.class下面 正确的如下图 解决办法如下 由于在resources下面不能创建package,只能创建文件夹Dire ...
最新文章
- HDU - 1269迷宫城堡 -强连通tanjar算法
- 如何检查字符串是否包含Ruby中的子字符串?
- 测试之美---测试员的心思你不懂
- pl/sql远程连接oracle服务器问题(各种情况) .,plsql远程连接oracle服务器问题(各种情况).docx...
- tensorflow包_在Keras和Tensorflow中使用深度卷积网络生成Meme(表情包)文本
- wegame地下城不显示服务器,在电脑端wegame看不到旭旭宝宝?来吧我教你! - 地下城与勇士掌游宝...
- oracle 10g 安装完成后,无法登陆EM的解决办法
- CSDN CODE 将于本月底彻底关闭,请尽快迁移到码云
- 如何在网上买到下铺票2020_如何在网上购票选择下铺和靠窗的座位
- QT+VS开发界面入门(qt界面在VS2022实现自动生成槽函数)
- mysql5.7 alter,MySQL 5.7推荐使用ALTER USER修改密码
- Java猜拳游戏代码实验总结_java猜拳小游戏程序设计实验报告.doc
- 货币转换python代码_演示4:python与Tkinter的货币转换,4python,币值,含,tkinter
- Error creating bean with name ‘sqlSessionFactory‘ defined in class path resource [applicationContext
- LeetCode 到底怎么刷?GitHub 上多位大厂程序员亲测的高效刷题方式
- 03异常(Exceptions)异常
- 最全软件测试面试题(经典)
- 贴片Y1电容和贴片Y2电容简介!
- latex 字体大小设置
- mysql和eclipse用户管理系统_房产备案管理系统的设计与实现(Eclipse,SpringBoot,MySQL)...