Invalid bound statement (not found)问题解决方案
程序员文章站
2022-05-28 12:57:06
...
bug记录
A:问题的出现
Invalid bound statement (not found): com.tiyity.edu.mapper.EduCourseMapper.queryCourseConfirmInfo
B:问题的分析
class目录下没有找到和mapper对应的xml文件
c:如何解决
1.在parent项目的pom.xml文件添加
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</build>
如果加了上面的配置依然没有在target的classes里面还是没有xml 需要rebuild一下
2.如果出现这个错误:‘mapperLocations’ was not specified or no matching resources found
在你所在微服务的application.properties里面添加
#application.properties配置扫描xml文件所在路径
mybatis-plus.mapper-locations=classpath:com/tiyity/edu/mapper/xml/*.xml
重启微服务基本就解决了
推荐阅读
-
Invalid bound statement (not found): com.ccfct.smallsapling.mapper.UserMapper.selectById
-
PDO版本问题 Invalid parameter number: no parameters were bound_PHP教程
-
解决Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 问题
-
spring boot Invalid bound statement (not found)
-
使用junit进行单元测试时报错Invalid bound statement (not found)
-
PDO版本问题 Invalid parameter number: no parameters were bound
-
SpringBoot整合mybatis访问时报错Invalid bound statement (not found)
-
关于oracle PL/SQL存储过程 PLS-00905 object is invalid,statement ignored问题的解决
-
引入mybatis-plus报 Invalid bound statement错误问题的解决方法
-
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):