org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): .AdminUserService.

2018-08-31 13:57:44.190 INFO 11664 — [nio-8888-exec-2] o.apache.tomcat.util.http.parser.Cookie : A cookie header was received [sysAdmin.company1=SST,sysAdmin.sysType1=Hub; Idea-1c2d522=fbcffa79-2c2a-4413-bae8-987cc663bf91] that contained an invalid cookie. That cookie will be ignored.Note: further occurrences of this error will be logged at DEBUG level.
2018-08-31 13:57:44.196 INFO 11664 — [nio-8888-exec-2] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring FrameworkServlet ‘dispatcherServlet’
2018-08-31 13:57:44.196 INFO 11664 — [nio-8888-exec-2] o.s.web.servlet.DispatcherServlet : FrameworkServlet ‘dispatcherServlet’: initialization started
2018-08-31 13:57:44.222 INFO 11664 — [nio-8888-exec-2] o.s.web.servlet.DispatcherServlet : FrameworkServlet ‘dispatcherServlet’: initialization completed in 25 ms
2018-08-31 13:57:44.231 DEBUG 11664 — [nio-8888-exec-2] o.s.b.w.s.f.OrderedRequestContextFilter : Bound request context to thread: org.apache.catalina.connector.RequestFacade@2ba20f61
2018-08-31 13:57:44.254 DEBUG 11664 — [nio-8888-exec-2] o.s.b.w.s.f.OrderedRequestContextFilter : Cleared thread-bound request context: org.apache.catalina.connector.RequestFacade@2ba20f61
2018-08-31 13:57:44.256 ERROR 11664 — [nio-8888-exec-2] o.a.c.c.C.[.[.[/].[dispatcherServlet] : 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.jvtd.auth.service.AdminUserService.selectByPrimaryKey] with root cause

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.jvtd.auth.service.AdminUserService.selectByPrimaryKey
at org.apache.ibatis.binding.MapperMethod SqlCommand.(MapperMethod.java:227)atorg.apache.ibatis.binding.MapperMethod.(MapperMethod.java:49)atorg.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:65)atorg.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:58)atcom.sun.proxy. S q l C o m m a n d . ( M a p p e r M e t h o d . j a v a : 227 ) a t o r g . a p a c h e . i b a t i s . b i n d i n g . M a p p e r M e t h o d . ( M a p p e r M e t h o d . j a v a : 49 ) a t o r g . a p a c h e . i b a t i s . b i n d i n g . M a p p e r P r o x y . c a c h e d M a p p e r M e t h o d ( M a p p e r P r o x y . j a v a : 65 ) a t o r g . a p a c h e . i b a t i s . b i n d i n g . M a p p e r P r o x y . i n v o k e ( M a p p e r P r o x y . j a v a : 58 ) a t c o m . s u n . p r o x y . Proxy73.selectByPrimaryKey(Unknown Source)
at com.jvtd.auth.controller.AdminUserController.page(AdminUserController.java:33)
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:209)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:877)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:783)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:991)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:974)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:866)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:851)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol ConnectionHandler.process(AbstractProtocol.java:790)atorg.apache.tomcat.util.net.NioEndpoint C o n n e c t i o n H a n d l e r . p r o c e s s ( A b s t r a c t P r o t o c o l . j a v a : 790 ) a t o r g . a p a c h e . t o m c a t . u t i l . n e t . N i o E n d p o i n t SocketProcessor.doRun(NioEndpoint.java:1468)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor Worker.run(ThreadPoolExecutor.java:624)atorg.apache.tomcat.util.threads.TaskThread W o r k e r . r u n ( T h r e a d P o o l E x e c u t o r . j a v a : 624 ) a t o r g . a p a c h e . t o m c a t . u t i l . t h r e a d s . T a s k T h r e a d WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)

2018-08-31 13:57:44.666 DEBUG 11664 — [nio-8888-exec-3] o.s.b.w.s.f.OrderedRequestContextFilter : Bound request context to thread: org.apache.catalina.connector.RequestFacade@2ba20f61
2018-08-31 13:57:44.714 DEBUG 11664 — [nio-8888-exec-3] o.s.b.w.s.f.OrderedRequestContextFilter : Cleared thread-bound request context: org.apache.catalina.connector.RequestFacade@2ba20f61

springboot与mybatis整合的时候报无法找到service中的方法

解决办法

如果service配置没问题的时候,可能是mapper没扫描到,方法找不到
我的问题所在是:
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): .AdminUserService._第1张图片

我的启动类配置的@MapperScan(“com.jvtd”)

只到com.jvtd,感觉可以扫描到,但是不可以的。

修改为
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): .AdminUserService._第2张图片

成功解决。给大家提供个思路方向。

欢迎大家加入Java高级架构/互联网(严禁培训机构、广告群,最干净的技术交流微信群):加微信:1083683159,一起交流技术。
微信平台本人收集个大量资源(4000G架构资源),只做分享,欢迎大家关注获取,保证免费,非任何机构
更多精彩请扫码关注微信公众号—— 名称:java版web项目 id :java_project

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): .AdminUserService._第3张图片

你可能感兴趣的:(bug)