spring boot 整合mybatis org.apache.ibatis.binding.BindingException: Invalid bound statement(not found)
2018-12-20 14:24
1051 查看
原因是接口**Mapper接口映射不到**Mapperxml
1.检查**Mapperxml 是否跟**Mapper接口名一致
2.配置包扫描
3.检查taget 目录下是否有将**Mapper.xml加载进去,如果没有,则说明编译没有将java目录下的xml文件加载经classpath目录下
解决:
将**Mapper.xml文件移到resource目录下
maven工程可以在pom文件中加入:
[code]<build> <resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.xml</include> </includes> <filtering>true</filtering> </resource> </resources> </build>
相关文章推荐
- spring boot 整合mybatis org.apache.ibatis.binding.BindingException: Invalid bound statement(not found)
- spring+mybatis整合报错:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- 当mybatis整合spring后出现org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- springboot配置时出现org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- spring mybatis集成报错:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.zzq.springboot.
- mybatis+springmvc:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- mybatis整合springmvc时的错误org.apache.ibatis.binding.BindingException: Invalid bound statement (not found
- mybatis “org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)”
- mybatis: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- mybatis绑定错误:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- mybatis绑定错误:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- mybatis使用时org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):的错误
- 关于整合SSH,出现org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- MyBatis Error:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)(IDEA)
- MyBatis笔记----报错:Exception in thread "main" org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)解决方法
- Maven 遇到mybatis 发生org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- 关于mybatis “org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)” 错误的问题
- 【spring boot Mybatis】报错:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.newhope.interview.dao.UserMapper.add
- mybatis使用bug:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):