在搭建自己的后台管理,遇到一个比较小问题,顺便记录了一下。

启动SpringBoot后台时,前端访问后台执行Mybatis时,出现了这样的报错:

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.zhu.fte.dao.SysUserMapper.selectByExample

经检查,发现原来springboot整合mybatis, 需要在pom.xml里增加以下信息:

  1 <build>
2 <resources>
3 <resource>
4 <directory>src/main/java</directory>
5 <includes>
6 <include>**/*.xml</include>
7 </includes>
8 </resource>
9 </resources>
10 </build>

若遗漏话,将导致在编译时,只会生成Mapper的class文件,而没有xml文件,因此,就会报找不到selectByExample的错误信息。

SpringBoot+Mybatis整合出现org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)的解决的更多相关文章

  1. mybatis使用时org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):的错误

    最近在使用mybatis时,出现了 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): 这 ...

  2. mybatis错误之org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

    玩了MyBatis差不多有两年了,中间也玩过MyBatis-Plus,这个MyBatis-Plus其实与MyBatis的区别并不大.今天写博客业务代码的时候,犯一个初学者犯过的错误. 错误信息如下:o ...

  3. org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): 错误解决

    报错信息:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 说明:这段报错信息表示 Map ...

  4. 使用maven整合mybatis时出现org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

    分析原因是mybatis的映射文件的问题,首先进行分析排查: 1.检查mapper接口和对应的xml文件的包名是否对应 2.检查xml文件的namespace与mapper接口的包名是否对应 3.检查 ...

  5. Maven项目使用mybatis报错 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):

    maven项目使用mybatis时,找不到mapper文件(.xml) 错误信息提示: 项目可以正常运行,但是在有请求到达服务器时(有访问数据库的请求),会出现报错!! 错误原因: mybatis没有 ...

  6. maven 项目报错org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)解决

    idea在使用maven构建的项目中使用mybatis时报错org.apache.ibatis.binding.BindingException: Invalid bound statement (n ...

  7. 解决 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 以及MyBatis批量加载xml映射文件的方式

    错误 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 的出现,意味着项目需要xml文件来 ...

  8. MyBatis笔记----报错Exception in thread "main" org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.ij34.model.UserMapper.selectUser

    信息: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@41cf53f9: startup ...

  9. Spring boot结合mybatis开发的报错:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

    错误:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found),经过排查确定是没有找到xml的原因 ...

  10. idea 单元测试 mybatis spring-test 异常: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

    因为在idea中必须在test下才能进行单元测试,所以进行单元测试时,ssm的项目会因为找不到resourece中的配置文件而报错 这里 org.apache.ibatis.binding.Bindi ...

随机推荐

  1. cesium教程7-官方示例翻译-模型要素选择

    源代码示例: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UT ...

  2. Gradle常用功能拾掇

    介绍 Gradle 是一个基于groovy动态语言的java项目管理工具,灵活性和速度好于java,他的build脚本完全可以以写groovy代码的方式来实现,所以灵活性很高,当然也就比maven的x ...

  3. 使用 Amazon Cloud WAN 构建您的全球网络(内含免费套餐申请入口)

    前言 对 AWS 云技术感兴趣的朋友们,可以尝试申请免费套餐的 AWS 账户,提供了 100 余种可以使用免费套餐的 AWS 云服务. 国内区域账户:https://www.amazonaws.cn/ ...

  4. prometheus使用4

    安装pushgateway 下载地址: https://github.com/prometheus/pushgateway/releases 下载这个 [root@mcw04 ~]# tar xf p ...

  5. salesforce零基础学习(一百三十八)零碎知识点小总结(十)

    本篇参考: https://help.salesforce.com/s/articleView?id=release-notes.rn_apex_5level_SOQLqueries.htm& ...

  6. k8s&dapr开发部署实验(1)服务调用

    前置条件 安装docker与dapr: 手把手教你学Dapr - 3. 使用Dapr运行第一个.Net程序 安装k8s dapr 自托管模式运行 新建一个webapi无权限项目 launchSetti ...

  7. python之Faker库如果构造用户信息测试数据

    代码链接1:https://blog.csdn.net/qq_38484679/article/details/115244711 补充代码链接0:https://blog.csdn.net/weix ...

  8. C#WPF的多屏显示问题

    如果想让窗口在第二个屏幕中显示 public MainWindow() { InitializeComponent(); Screen[] _screens = Screen.AllScreens; ...

  9. 通过计算巢轻松部署 Walrus

    概述 Walrus 是一个用于管理和部署应用程序的平台,它提供了一个集中化的管理界面,使用户能够轻松地管理应用的生命周期,包括创建.配置.部署.监控和维护应用.Walrus 还提供了一些高级功能,如应 ...

  10. MyBatis完成CRUD 详细细节内容

    1. MyBatis完成CRUD 详细细节内容 @ 目录 1. MyBatis完成CRUD 详细细节内容 每博一文案 2. MyBatis工具类SqlSessionUtil的封装 3. 准备工作 3. ...