老师我Invalid bound statement (not found) 报错是什么原因
来源:7-3 查询节点和递归查找功能开发
Xn7
2019-08-31
2019-08-31 23:44:14,923 - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.example.demo.dao.TestMapper.insert] with root cause
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.example.demo.dao.TestMapper.insert
at org.apache.ibatis.binding.MapperMethodSqlCommand.<init>(MapperMethod.java:235)atorg.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:53)atorg.apache.ibatis.binding.MapperProxy.lambdaSqlCommand.<init>(MapperMethod.java:235)
at org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:53)
at org.apache.ibatis.binding.MapperProxy.lambdaSqlCommand.<init>(MapperMethod.java:235)atorg.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:53)atorg.apache.ibatis.binding.MapperProxy.lambdacachedMapperMethod0(MapperProxy.java:61)atjava.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)atorg.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:61)atorg.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:56)atcom.sun.proxy.0(MapperProxy.java:61)
at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
at org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:61)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:56)
at com.sun.proxy.0(MapperProxy.java:61)atjava.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)atorg.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:61)atorg.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:56)atcom.sun.proxy.Proxy59.insert(Unknown Source)
at com.example.demo.controller.portal.IndexController.index(IndexController.java:24)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:892)
检查 classes 下面mapper 都加载了 ,dao mapper namespace 都正确。
谢谢
1回答
-
慕莱坞0782330
2019-09-01
我觉得你可以把dao的接口和mapper.xml对应的语句截图一下,这样更好定位
00
相似问题