nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
来源:互联网 发布:淘宝店铺如何发布微淘 编辑:程序博客网 时间:2024/04/30 21:48
mybatis报如下错误:
org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [dispatcherServlet] in context with path [/zc-beauty2] threw exception [Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.zc.beauty.dao.ICaptchaMapper.savePhoneCode] with root cause org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.zc.beauty.dao.ICaptchaMapper.savePhoneCode错误之处可能有以下几个:
1、没有加载mapper文件:
<mappers> <mapper resource="mappers/CaptchaMapper.xml" /></mappers>2、接口路径写错了:
<!-- 这里namespace必须是接口的路径,不然要运行的时候要报错 “is not known to the MapperRegistry”--><mapper namespace="com.zc.beauty.dao.ICaptchaMapper">3、方法名写错了:
<!-- 这里的id必须和接口中的方法名相同,不然运行的时候也要报错 --> <insert id="savePhoneCode" parameterType="com.zc.beauty.model.PhoneCaptcha"> insert into phone_captcha(u_phone, c_phonecode, c_sendtime) values(#{u_phone}, #{c_phonecode}, #{c_sendtime}) </insert>4、没有 <!-- 数据映射器类 mapper bean -->
<bean id="CaptchaMapper" class="org.mybatis.spring.mapper.MapperFactoryBean" > <property name="sqlSessionFactory" ref="SqlSessionFactory" /> <property name="mapperInterface" value="com.zc.beauty.dao.ICaptchaMapper" /> </bean>大概就以上问题。
0 0
- nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- nested exception is 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)
- 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)
- 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)
- toolbar伸缩折叠
- 蓝桥杯题——BEGIN-2 序列求和 BEGIN-3 圆的面积 BEGIN-4 Fibonacci数列 C语言+Java
- Intent传递Edittext内容到另一个Activity中Textview显示
- 设计模式(六)——单例模式
- android新手,求大神的指点啊
- nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- Android 退出app再次进入无法获取存放在shareprefenrence中的内容
- 左递归
- JavaAPI详解系列(5):String类(5)
- Sqlite 只能插入1000行
- 安卓开发,Dialog中如何引用Activity中的组件?
- 来电接听问题
- [转]截图原理(一)——Android自动化测试学习历程(1)
- Jquery过滤器的基本使用案例