解决问题的步骤,请参考:

1.mapper.xml要和对应的mapper接口在同一个包下,包名要一模一样。

2.Mapper接口中的方法在Mapper.xml中没有,然后执行Mapper接口的方法会报

3. Mapper接口的方法返回值是List<DTO>,而select元素没有正确配置ResultMap,或者只配置ResultType

4. 如果你确认没有以上问题,请任意修改下对应的xml文件,比如删除一个空行,保存.问题解决

5.看下mapper的XML配置路径是否正确

mybatis:
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
mapper-locations: classpath:mapper/*.xml

6.是否配置包扫描:@MapperScan("com.compane.projectname.mapper")

mybatis报Invalid bound statement (not found) 分析的更多相关文章

  1. mybatis 报Invalid bound statement(not found) 和 Property 'mapperLocations' was not specified or not matching resources found

    排除问题的步骤: 1.首先检查mapper文件和mapper接口的文件名是否相等. 2.pom.xml是否把xml排除了,这样写就会src/main/java下所有的Mybatis的xml文件都删除, ...

  2. idea的spring整合基于xml文件配置的mybatis报Invalid bound statement (not found): com.music.dao.MusicDao.findAll的问题

    一. 题主当时就是自己尝试整合spring和mybatis的时候遇到了这个问题,当时题主只看到了用注解的方式配置的dao层,题主用的是xml文件配置的形式, 而且坑爹的是题主的两个文件的路径写的也不一 ...

  3. MyBatis错误--Invalid bound statement (not found)

    今天在开发项目的时候使用MyBatis发生错误:Invalid bound statement (not found) 具体错误信息: org.springframework.beans.factor ...

  4. Mybatis-plus报Invalid bound statement (not found)错误

    错误信息 org.springframework.security.authentication.InternalAuthenticationServiceException: Invalid bou ...

  5. mybatis:Invalid bound statement (not found)

    [常规解决办法] 如果出现: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 一般的原因 ...

  6. mybatis错误Invalid bound statement (not found) 的解决办法

    <!-- IDEA需要添加一下内容,否则无法找到mapper --> <build> <resources> <resource> <direct ...

  7. myBatis中Invalid bound statement (not found)错误

    环境:Idea.ssm.maven 由于使用maven的原因,maven不会扫描到mapper的xml文件所以会出现此类问题. 每次走到mapper方法时就抛异常:Invalid bound stat ...

  8. 解决Mybatis的invalid bound statement (not found)异常

    使用Maven构建SSM时, 需要在pom.xml中配置一些信息, 否则mapper.xml就无法被扫描到, 程序就会抛invalid bound statement (not found)异常 解决 ...

  9. MyBatis使用动态代理报 invalid bound statement (not found) 错

    这个问题网上大部分都说xml文件中的路径不对 或者是resources之类的问题,如果那些文章的解决方案解决不了你的问题的话,可以看一下我遇到的这种情况: 前提: mybatis-config.xml ...

随机推荐

  1. 【BZOJ3011】[Usaco2012 Dec]Running Away From the Barn 可并堆

    [BZOJ3011][Usaco2012 Dec]Running Away From the Barn Description It's milking time at Farmer John's f ...

  2. windows 系统无法启动windows event log 服务

    windows 系统无法启动windows event log 服务 关键词:无法启动系统事件日志 尝试解决步骤 [1]权限:把如图中logsfile文件等都给local service [2]把C: ...

  3. SqlServer PIVOT函数快速实现行转列,UNPIVOT实现列转行(转)

    我们在写Sql语句的时候没经常会遇到将查询结果行转列,列转行的需求,拼接sql字符串,然后使用sp_executesql执行sql字符串是比较常规的一种做法.但是这样做实现起来非常复杂,而在SqlSe ...

  4. Java API操作HA方式下的Hadoop

    通过java api连接Hadoop集群时,如果集群支持HA方式,那么可以通过如下方式设置来自动切换到活动的master节点上.其中,ClusterName 是可以任意指定的,跟集群配置无关,dfs. ...

  5. grub的安装与配置-------引导redhat grub

    1.安装 有两种方法: a.在联网的情况下,用新立德安装: apt-get install grub b.在没网的时候,特别是linux网卡驱动没有安装: 自己从http://packages.ubu ...

  6. vue开发笔记

    1.一定要弄明白什么是数据驱动,以前jQuery操作dom的那种思维模式可以不去考虑,在类似框架中任何一个效果的完成都是由数据驱动来完成的. 2.以.vue作为扩展名的文件,是vue组件,他是一个类, ...

  7. 3.3 Templates -- Conditionals(条件语句)

    有时候你可能仅仅想展现模板的一部分,如果属性存在的话. 1. 我们可以使用{{if}}去有条件的渲染一块: {{#if person}} Welcome back, <b>{{person ...

  8. C语言——stdio.h

        int fgetc(FILE * stream); get character from stream 返回流中的一个字符,并以int的类型返回,如果碰到文件的结尾,或者一个错误发生,函数返回 ...

  9. (20)Cocos2d-x中的引用计数(Reference Count)和自动释放池(AutoReleasePool)

    引用计数 引用计数是c/c++项目中一种古老的内存管理方式.当我8年前在研究一款名叫TCPMP的开源项目的时候,引用计数就已经有了. iOS SDK把这项计数封装到了NSAutoreleasePool ...

  10. Yahoo Programming Contest 2019

    A - Anti-Adjacency 签. #include <bits/stdc++.h> using namespace std; int main() { int n, k; whi ...