mybatis映身文件路径有误: Invalid bound statement (not found): org.ibaiqi.gather.mapper.RecruitGatherDao.listRecruitGathers

报错原因,找不到映射文件mapper.xml路径
1)<mapper resource="org/ibaiqi/gather/mapper/RecruitGatherDaoMapper.xml" /> 路径不对
2)服务层单元测试,也需要调用 mybatis映射文件,也可能报错误

 
浏览网页报错,junit服务层,单元测试也报错过
Type 异常报告

消息 Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): org.ibaiqi.gather.mapper.RecruitGatherDao.listRecruitGathers

描述 服务器遇到一个意外的情况,阻止它完成请求。

Exception

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): org.ibaiqi.gather.mapper.RecruitGatherDao.listRecruitGathers
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:986)
    org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:870)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
    org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:855)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

Root Cause

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): org.ibaiqi.gather.mapper.RecruitGatherDao.listRecruitGathers
    org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:225)
    org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:48)
    org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:65)
    org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:58)
    com.sun.proxy.$Proxy19.listRecruitGathers(Unknown Source)
    org.ibaiqi.gather.service.imp.RecruitGatherServiceImp.listRecruitGathers(RecruitGatherServiceImp.java:31)
    org.ibaiqi.gather.controller.RecruitGatherController.findAll(RecruitGatherController.java:28)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    java.lang.reflect.Method.invoke(Method.java:498)
    org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:209)
    org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)
    org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)
    org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:871)
    org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:777)
    org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
    org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:991)
    org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925)
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:978)
    org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:870)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
    org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:855)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 
 

 

 

 

 

 

 

 

 

 

 

 

 

posted @ 2020-03-07 15:47  码哥之旅  阅读(212)  评论(0编辑  收藏  举报