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

这里 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

就是因为找不到mybatis的配置文件才报错的

只需要在测试时 右键 resources

改为test用的resources就行了 运行main下的项目时再改回去就行了

不过诡异的发现,在设置过test res之后,再改回main的res后也可以正常运行单元测试了……

可能是缓存之类的原因,不过还是需要先设置过一次test res才能正常运行单元测试的,最好在test时换成test res,避免又出现找不到的错误

idea 单元测试 mybatis spring-test 异常: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)的更多相关文章

  1. Spring扫面路径配置不全导致异常 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): 的原因

    运行Junit测试类 package cn.bgodata.x.zero.service; import org.junit.Test; import org.junit.runner.RunWith ...

  2. Mybatis笔记二:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

    错误异常:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.test.dao.N ...

  3. 异常 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 解决方案

    原来是因为 AssetsMapper.xml 不知道为什么不见了,导致这个异常,在启动项目时的启动任务里调用到了它,然后因为没有这个xml,所以抛出异常 启动信息: C:\extend\Develop ...

  4. mybatis配置时出现org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

    如果出现: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 一般的原因是Mapper i ...

  5. IDEA+Maven+Mybatis 巨坑:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.rao.mapper.UserMapper.findAll

    org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.rao.mapper.User ...

  6. mybatis plus 报错 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

    org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 少了个范型

  7. MyBatis典型的错误org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

    XXXmapper.java(接口) XXXmapper.xml(结果集映射) //此两个文件要在统一包下,且xml中的namespace是唯一的,为了区分须写成 该xml的全路径

  8. 【spring boot Mybatis】报错:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.newhope.interview.dao.UserMapper.add

    报错如下: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.newhope.i ...

  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的原因 ...

随机推荐

  1. 【模板】Tarjan算法与有向图的强连通性

    概念 流图 给定一个有向图G= (V,E),若存在r∈V满足,满足从r出发能够到达V中所有的点,则称G是一个流图,记为(G,r),其中r是流图的源点. 流图的搜索树 在一个流图(G,r)上从r出发,进 ...

  2. 8、Spring Cloud-配置中心 Spring Cloud Config(待补充)

    8.1.Config Server 本地读取配置文件 Config Server 可以从本地仓库读取配置文件,也可以从远处 Git 仓库读取.   本地仓库是指将所有的配置文件统 写在 Config ...

  3. 高斯消元求主元——模意义下的消元cf1155E

    #include <bits/stdc++.h> , MO = ; ; inline int qpow(int a, int b) { ; while(b) { ) { ans = 1ll ...

  4. disconf实践(二)基于XML的分布式配置文件管理,不会自动reload

    上一篇博文介绍了disconf web的搭建流程,这一篇就介绍disconf client通过配置xml文件来获取disconf管理端的配置信息. 1. 登录管理端,并新建APP,然后上传配置文件 2 ...

  5. NMON监控linux性能

    NMON监控linux性能 一.下载nmon压缩包,下载地址:http://download.csdn.net/download/fhqsse220/6699865 二.安装方法: 1.将nmon_l ...

  6. CC2640R2F&TI-RTOS 拿到 TI CC2640R2F 开发板 第四件事就是 修改第三件事信号量超时改为 事件 超时,并增加 事件控制 ,用于控制LED 闪烁时间或者关闭

    /* * data_process.c * * Created on: 2018年7月5日 * Author: admin */ #include "board_led.h" #i ...

  7. cocos2d-x3.0 用CCDictionary写文件

    bool CDownLoad_LocalData::WriteToConfigFile( DownLoadLocalData* downdata ){ CCDictionary* pDict = CC ...

  8. tortoisegit 学习

    注:陈刚在Ubuntu虚拟机架设了git的服务器,用于管理公司的代码工程: tortoisegit是TortoiseSVN的Git版本,tortoisegit用于迁移TortoiseSVN到Torto ...

  9. iOS之LLDB调试器

    LLDB被定位为下一代的高性能调试器,默认内置于Xcode IDE内, 支持在PC.iOS设备以及模拟器上调试C.Objective-C和C++. 关于LLDB的官方介绍:LLDB 常用命令: 1.  ...

  10. php无限极分类处理

    /** * 无限极分类处理(通过递归方式实现) * @param $section 原始数据Array * @param $html 界面显示前缀,比如 |- * @param $spear 分级中所 ...