org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)?
2018-01-04 21:12
573 查看
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.search.mapper.ItemMapper.getItemList at org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:189) at org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:43) at org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:58) at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:51) at com.sun.proxy.$Proxy30.getItemList(Unknown Source) at com.search.service.impl.ItemServiceImpl.importItems(ItemServiceImpl.java:43) at com.search.controller.ItemController.importItems(ItemController.java:41) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
异常分析:mybatis的mapper.xml文件没有被扫描到,在工程的pom.xml加上如下节点代码即可解决。
ad01 <resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.properties</include> <include>**/*.xml</include> </includes> <filtering>false</filtering> </resource> <resource> <directory>src/main/resources</directory> <includes> <include>**/*.properties</include> <include>**/*.xml</include> </includes> <filtering>false</filtering> </resource> </resources>
相关文章推荐
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- 关于org.apache.ibatis.binding.BindingException: Invalid bound statement (not found),找不到mapper文件问题解决
- mybatis “org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)”
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- eclipse里报org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)解决方法
- 无效绑定问题:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- 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)
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- mybatis maven打包出现org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)错误
- ssm整合出现org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)错误
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.yolly.platform.
- mybatis整合springmvc时的错误org.apache.ibatis.binding.BindingException: Invalid bound statement (not found
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)新的异常解决方案
- springboot项目打包后运行报org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- 疑难杂症(4) -- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- HTTP Status 500 - Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)异常处理