nested exception is org.apache.ibatis.binding.BindingException报错(maven)

大半夜 找一个bug      总算解决了

运行环境: eclipse      Version: Mars.1 Release (4.5.1)   (自带maven)   

问题   :  org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): yycg.base.dao.mapper.userMapper.selectUser

                  已经测试spring注入是没有问题的   

原因:也就是  配置文件没有在找到。


解决过程:  

[INFO] Copying 8 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @ project ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 5 source files to C:\Users\Administrator\workspace\yycgproject\target\classes
[INFO] 
[INFO] <<< tomcat-maven-plugin:1.1:run (default-cli) < compile @project <<<

 C:\Users\Administrator\workspace\yycgproject\target\classes 在这里是项目部署的位置

发现mapper 目录 没有xml配置文件(火大) 


解决办法:

在pom里面加上一下代码(注意这是在 里面添加的)






src/main/java

**/*.properties
**/*.xml

false




src/main/resources

**/*.properties
**/*.xml

false





你可能感兴趣的:(BUG)