IDEA报错–mybatis

Exception in thread “main” org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.lsy.mapper.UserMapper.selectByExample

<2022-01-25 16:25:59,547> DEBUG (DefaultSingletonBeanRegistry.java:225) [main] (org.springframework.beans.factory.support.DefaultListableBeanFactory) -Creating shared instance of singleton bean 'usersService'
Exception in thread "main" org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.lsy.mapper.UserMapper.selectByExampleat org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:235)at org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:53)at org.apache.ibatis.binding.MapperProxy.lambda$cachedInvoker$0(MapperProxy.java:115)at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)at org.apache.ibatis.binding.MapperProxy.cachedInvoker(MapperProxy.java:102)at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:85)at com.sun.proxy.$Proxy7.selectByExample(Unknown Source)at com.lsy.service.impl.UsersServiceImpl.findUsersAll(UsersServiceImpl.java:50)at com.lsy.test.FindUsersAllTest.main(FindUsersAllTest.java:18)

原因:
在*mapper.xml中没有 *mapper类中的selectByExample方法对应的配置:
加上就ok了:

<select id="selectByExample" parameterType="java.lang.Integer" resultMap="BaseResultMap">select<include refid="Base_Column_List" />from users</select>

Exception in thread “main“ org.apache.ibatis.binding.BindingException: Invalid bound statement (not相关推荐

  1. 报错:Exception in thread “main“ org.apache.ibatis.binding.BindingException: Invalid bound statement (n

    建立Spring+SpringMVC+JDBC项目报以下错误: 解决办法: 在pom.xml的bulid标签里面加上如下代码: <resources><resource>< ...

  2. Exception in thread “main“ org.apache.ibatis.binding.BindingException: Type interface com.neusoft.Id

    Exception in thread "main" org.apache.ibatis.binding.BindingException: Type interface com. ...

  3. mybatis找不到xml中的方法;org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

    mybatis配置mapper对的.配置dao对的.配置都是对的,但是就是发现不了方法,那就是xml找到的问题了,在群友的提示下找到target/classes文件夹里根本没有xml文件.故找到原因: ...

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

    之前有用过SSM框架,并且自己搭过,完全没问题.工作之后一直用maven,前两天在maven下搭建了一个SSM框架,但是一直报绑定失效错误,具体错误如下: org.apache.ibatis.bind ...

  5. 解决org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):xxx问题

    文章目录 1. 复现问题 2. 分析问题 2.1 检查启动类的配置 2.2 检查xml文件对应java类的配置是否有误 2.3 检查application.yml文件的mybatis配置是否有误 2. ...

  6. 【踩坑】遇到 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 报错...

    今天在重做 iblog 客户端时,测试接口情况,发现了 org.apache.ibatis.binding.BindingException: Invalid bound statement (not ...

  7. org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): dao.UserDao.selectU

    org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): dao.UserDao.selectU ...

  8. springboot整合Mybatis提示org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

    在用maven配置mybatis环境时出现此BindingExceptiony异常,发现在classes文件下没有mapper配置文件,应该是maven项目没有扫描到mapper包下的xml文件, 在 ...

  9. org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):的三种解决方式

    在使用mybatis-plus自定义SQL的时候,没有使用注解方式,而是将SQL语句写在mappper.xml文件中,就报了这个错:org.apache.ibatis.binding.BindingE ...

最新文章

  1. 部署并使用Docker(Alibaba Cloud Linux 2)
  2. 6.Java中的变量(定义)和数据类型(划分)
  3. [vue] 你了解什么是函数式组件吗?
  4. 10 操作系统第二章 进程管理 死锁、死锁的处理策略 银行家算法
  5. 收藏 | 来自微软大神的机器学习秘籍!
  6. numpy_basic
  7. P30年订单或超2000万 正与苹果抢流水线
  8. Android 如何检查麦克风是否被任何后台应用程序使用?
  9. 电脑上的歌曲怎么传到苹果手机上面,怎么把电脑上的歌导入苹果手机
  10. 针对TCP连接的网络监控平台—AINA Lyzer
  11. 研究生期间如何赚外快
  12. 项目人生,成长与感悟
  13. 基于GPU编程的三维重建系统
  14. MongoDB循序渐进之[入门]
  15. 从懵懂无知到独挡一面——那些萌新程序员的进阶之路
  16. 达内python 资源_Python学习资源整理,优质Python学习资源推荐
  17. 计算机网络英语app,学习英语软件哪家强?下个app随时随地学英语
  18. MediaPlayer提示“无法播放视频”
  19. iOS各种证书的了解
  20. java mysql 时间查询_java 根据时间段查询数据库

热门文章

  1. pks与终端服务器通讯,pks与moxa串口服务器通讯组态-专业自动化论坛-中国工控网论坛...
  2. 我的黑群晖学习之旅(4)外网访问之ZeroTier
  3. 【图片压缩减肥工具】批量图片压缩工具
  4. ECLIPSE的项目类型
  5. 大岩量化科普:如何在投资中参考夏普比率
  6. Unity插件专栏目录
  7. Windows RPC编程详解(好好学习)
  8. 如何实现欧姆龙PLC的在线编程和远程上下载
  9. 一周新闻纵览:Instagram非法收集用户数据,谷歌浏览器现漏洞,微信清粉服务泄露个人信息,去年境外网络攻击主要来自美国
  10. Centos 常用命令小记