springboot 集成mybatis Invalid bound statement (not found)异常
2016-10-11 15:44
726 查看
场景
在使用springboot集成mybatis的过程中出现一下异常。经过跟踪发现其实异常与springboot无关,主要是mybatis配置文件的原因。大家遇到类似问题,可直接进行定位。org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.antifraud.mapper.TestMapper.getTestList at org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:214) ~[mybatis-3.4.0.jar:3.4.0] at org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:48) ~[mybatis-3.4.0.jar:3.4.0] at org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:59) ~[mybatis-3.4.0.jar:3.4.0] at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:52) ~[mybatis-3.4.0.jar:3.4.0] at com.sun.proxy.$Proxy68.getTestList(Unknown Source) ~[na:na]
问题定位及解决
首先定位问题在Mapper配置文件。主要检查配置文件中此段代码:
<mapper namespace="com.antifraud.domain.Test" >
以上代码是我错误的示范。正式因为本应该配置为对应mapper类的namespace配置成domain类了。
因此,将上面的类指定为对应的mapper类即可。
相关文章推荐
- springboot 集成mybatis Invalid bound statement (not found)异常
- spring boot mybatis Invalid bound statement (not found)
- Spring Boot mybaties error Invalid bound statement (not found)
- springmvc+mybatis 诡异问题 Invalid bound statement (not found)
- mybatis invalid bound statement (not found) : com.XXXX
- mybatis Invalid bound statement (not found)
- Maven项目mybatis Invalid bound statement (not found)解决方法
- Invalid bound statement (not found) 异常原因
- 关于IDEA工具在springboot整合mybatis中出现的Invalid bound statement (not found)问题
- mybatis invalid bound statement (not found) 当心文件确实不存在
- maven + mybatis Invalid bound statement (not found) 错误解决
- Maven项目mybatis Invalid bound statement (not found)解决方法
- Mybatis——Invalid bound statement (not found)-Could not find result map java.lang.Integer
- Invalid bound statement (not found)-Mybatis在idea中错误
- Mybatis Invalid bound statement (not found)问题分析
- spring mybatis集成报错:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- 关于spring+mybatis多数据源,报Invalid bound statement的问题
- Invalid bound statement (not found): 异常
- MYBATIS异常:INVALID BOUND STATEMENT
- spring boot 整合mybatis org.apache.ibatis.binding.BindingException: Invalid bound statement(not found)