mybatis整合springmvc时的错误org.apache.ibatis.binding.BindingException: Invalid bound statement (not found
来源:互联网 发布:软件开发如何创业 编辑:程序博客网 时间:2024/04/29 20:41
今天在调试mybatis,新增一个搜索功能的时候报了一个这个错误
<span style="white-space:pre"></span>rg.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.apache.ibatis.binding.BindingException:
Invalid bound statement (not found): com.weitongming.mapper.BrandMapper.queryBrandsByNameorg.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:980)org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:859)javax.servlet.http.HttpServlet.service(HttpServlet.java:624)org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:844)javax.servlet.http.HttpServlet.service(HttpServlet.java:731)org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:121)org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)org.apache.logging.log4j.core.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:66)root cause网上一番搜索,得出答案如下:
1、请检查你的**mapper.xml值配置的namespace有没有对应上你的interface借口,请注意,是要完全对应上
<span style="white-space:pre"></span><!-- 绑定接口 --><span style="white-space:pre"></span><mapper namespace="com.weitongming.mapper.BrandMapper">
<span style="white-space:pre"></span>//接口定义
<span style="white-space:pre">public interface BrandMapper {</span>}大家可以在定义的时候习惯性的按ctrl,再把鼠标移上去,如果能有点击超链接的效果,那么意味着你的配置文件是能访问到源文件的,说明起码语法没错。
2、在xml值之中配置的方法在接口之中不存在,执行的时候也会报错
3、请注意返回值的类型,如果接口返回的对象是个list,那么xml配置的select的resultMap一定要配置,不能配置resultType
0 0
- mybatis整合springmvc时的错误org.apache.ibatis.binding.BindingException: Invalid bound statement (not found
- 关于mybatis “org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)” 错误的问题。
- 关于mybatis “org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)” 错误的问题
- 当mybatis整合spring后出现org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- spring+mybatis整合报错: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)
- mybatis绑定错误:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- Mybatis错误org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- 关于mybatis的org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- mybatis的 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): 报错。
- mybatis的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):的错误问题
- 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)
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- 流敏感,路径敏感和上下文敏感
- Spring 泛型依赖注入
- width:auto和width:100%的区别
- Struts2学习之旅(5)
- 01-subgradients_notes
- mybatis整合springmvc时的错误org.apache.ibatis.binding.BindingException: Invalid bound statement (not found
- Convolutional neural networks(CNN) (六) PCA and Whitening Exercise
- 简单爬虫
- Fastcgi和php-fpm的关系
- listView item 增加间距 以及item根部局 margin 失效原因
- 基于msp430的单片机的DES加密程序
- Rockchip Wi-Fi Bluetooth测试用例
- 浅谈Java两种并发类型——计算密集型与IO密集型
- compareTo方法