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

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. @font-face 字体

    一.@font-face是CSS3中的一个模块,把自己定义的Web字体嵌入到你网页中 @font-face的语法规则 @font-face { font-family: <YourWebFont ...

  2. 【Android】Android内存溢出问题---用自行开辟的空间进行对内存管理

    public static Bitmap readBitmap(String path) { BitmapFactory.Options options = new BitmapFactory.Opt ...

  3. SpringCloud--Ribbon负载均衡

    Ribbon实现客户端负载均衡 负载均衡:是对系统的高可用.网络压力的缓解和处理能力扩容的重要手段之一. 硬件负载均衡:主要通过在服务器节点之间安装专门用于负载均衡的设备: 软件负载均衡:通过在服务器 ...

  4. LightBGM之train

    用于模型的训练 1.说明: lightgbm.train(params, train_set, num_boost_round=100, valid_sets=None, valid_names=No ...

  5. Webservice实践(七)CXF 与Spring结合+tomcat发布

    上一节介绍了如何使用CXF 来发布服务,但是没有介绍使用web 容器来发布,很多项目需要用tomcat 这样的容器来发布.另外本节将介绍CXF 与spring 结合的方法. 一 目标: 1.利用spi ...

  6. nginx 下使用 bootstrap 字体的问题

    使用boostrap时,出现 glyphicons-halflings-regular.ttf glyphicons-halflings-regular.woff glyphicons-halflin ...

  7. Database Partitioning Options DATABASE SHARDING

    w主写从读.集群节点间时时内存复制.单表横切纵切.分析报表系统通过服务器联表 http://www.agildata.com/database-sharding/ Database Partition ...

  8. Kubernetes实战(二):k8s v1.11.1 prometheus traefik组件安装及集群测试

    1.traefik traefik:HTTP层路由,官网:http://traefik.cn/,文档:https://docs.traefik.io/user-guide/kubernetes/ 功能 ...

  9. BaseLayout

    angularjs2 knockoutjs framework7 jquerymobile bootstrap html5 css [Activity(Label = "ActivityBa ...

  10. PAT 1073 Scientific Notation[字符串处理][科学记数法]

    1073 Scientific Notation(20 分) Scientific notation is the way that scientists easily handle very lar ...