通过maven test 报org.apache.ibatis.binding.BindingException: Invalid bound statement
背景
直接使用eclipse工具去执行,没有问题,通过testng.xml去执行,没有问题,但通过mvn clean test执行,就报错,提示org.apache.ibatis.binding.BindingException: Invalid bound statement
解决方法
首先先肯定的是:mybatis的配置是没有问题,因为eclipse可以正常执行;
在eclipse中把mapper的xml文件放到src代码目录下是可以一起打包进classes的,而maven去编译的时候不会,就会导致找不到xml报错。