idea 单元测试 mybatis spring-test 异常: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
因为在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)的更多相关文章
- 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 ...
- 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 ...
- 异常 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 解决方案
原来是因为 AssetsMapper.xml 不知道为什么不见了,导致这个异常,在启动项目时的启动任务里调用到了它,然后因为没有这个xml,所以抛出异常 启动信息: C:\extend\Develop ...
- mybatis配置时出现org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
如果出现: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 一般的原因是Mapper i ...
- 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 ...
- mybatis plus 报错 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 少了个范型
- MyBatis典型的错误org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
XXXmapper.java(接口) XXXmapper.xml(结果集映射) //此两个文件要在统一包下,且xml中的namespace是唯一的,为了区分须写成 该xml的全路径
- 【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 ...
- Spring boot结合mybatis开发的报错:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
错误:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found),经过排查确定是没有找到xml的原因 ...
随机推荐
- ValueError: All strings must be XML compatible: Unicode or ASCII, no NULL bytes or control characters
转载请注明原文地址:https://www.cnblogs.com/cnodoo/p/9281366.html ValueError: All strings must be XML compati ...
- C/C++——new/delete和malloc/free的区别
new/delete和malloc/free的区别 扩容操作: 对于malloc是有一个realloc函数对应用于扩容的: 对于new,只能再new一个,for循环赋值过去,把原来的delete掉: ...
- 【node.js】Buffer(缓冲区)
Node.js中,定义了一个 Buffer 类,该类用来创建一个专门存放二进制数据的缓存区. 创建 Buffer 类 Node Buffer 类可以通过多种方式来创建. 1.创建长度为 10 字节的 ...
- 理解java的三大特性之多态
所谓多态就是指程序中定义的引用变量所指向的具体类型和通过该引用变量发出的方法调用在编程时并不确定,而是在程序运行期间才确定,即一个引用变量倒底会指向哪个类的实例对象,该引用变量发出的方法调用到底是哪个 ...
- [转]TortoiseSVN客户端的安装
TortoiseSVN是windows平台下Subversion的免费开源客户端. 一般我们都是先讲讲服务器的配置,然后再讲客户端的使用,但是在TortoiseSVN上,却可以反过来.因为,如果你的要 ...
- [LuoguP1034][Noip2002] 矩形覆盖
[LuoguP1034][Noip2002] 矩形覆盖(Link) 在平面上有\(N\)个点,\(N\)不超过五十, 要求将这\(N\)个点用\(K\)个矩形覆盖,\(k\)不超过\(4\),要求最小 ...
- 基于maven的JavaWeb项目构建部署
需要准备的安装文件: 1 JDk http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html jdk-8 ...
- Android 4.4系统获取root权限的方法
1. 准备工作: 准备一台ubuntu机器,将boot.img复制到该机器上,下载必要的工具sudo apt-get install abootimggit clone https://github. ...
- Android的JNI调用(二)
Android Studio 2.3在native下已经有了代码提示功能,按照提示下载相应组件就可以debug native代码. 一.Java调用JNI与JNI调用Java 1.1 C调用Java ...
- Altium 技巧 记录
1.隐藏全部网络,即隐藏全部的飞线,便于布局,在 PCB 编辑器下,选择工具→连接→显示或隐藏全部网络即可 2.元器件非常多时,模块化布局的小技巧,参考:Altium Designer(DXP)小技巧 ...