首页 新闻 会员 周边 捐助

在整合SSM项目的时候一直报statement

0
悬赏园豆:10 [待解决问题]

在检查的时候发现target目录下的路径报错找不到路径

但是我本身的代码是可以找到路径的

求大神帮下忙

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): xyz.sunruen.dao.BookMapper.queryAllBook
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1013)
    org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:897)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
    org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:882)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
    org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:118)

Root Cause

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): xyz.sunruen.dao.BookMapper.queryAllBook
    org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:235)
    org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:53)
    org.apache.ibatis.binding.MapperProxy.lambda$cachedMapperMethod$0(MapperProxy.java:61)
    java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
    org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:61)
    org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:56)
    com.sun.proxy.$Proxy17.queryAllBook(Unknown Source)
    xyz.sunruen.service.BookServiceImpl.queryAllBook(BookServiceImpl.java:34)
    xyz.sunruen.controller.BookController.list(BookController.java:25)
    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:190)
    org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)
    org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
    org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:892)
    org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797)
    org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
    org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1039)
    org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005)
    org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:897)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
    org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:882)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
    org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:118)

Leezy05的主页 Leezy05 | 初学一级 | 园豆:184
提问于:2020-02-09 19:43
< >
分享
所有回答(1)
0

应该不是配置的问题,看看你mapper映射文件和mapper interface的对应,是不是有名称不匹配的问题(针对BookMapper)

寻觅beyond | 园豆:923 (小虾三级) | 2020-02-09 21:28


接口和Mapper文件一样
单元测试也没有问题
多谢

支持(0) 反对(0) Leezy05 | 园豆:184 (初学一级) | 2020-02-09 21:36

@新木优子: BookMapper的每个接口(function)单元测试都没问题吗?

支持(0) 反对(0) 寻觅beyond | 园豆:923 (小虾三级) | 2020-02-09 21:43

@寻觅beyond: 没有问题

支持(0) 反对(0) Leezy05 | 园豆:184 (初学一级) | 2020-02-09 21:43
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册