首页 > 代码库 > MyBatis笔记----报错:Exception in thread "main" org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)解决方法
MyBatis笔记----报错:Exception in thread "main" org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)解决方法
报错
Exception in thread "main" org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.ij34.model.UserMapper.selectarticleat org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:230)at org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:48)at org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:65)at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:58)at com.sun.proxy.$Proxy0.selectarticle(Unknown Source)at com.ij34.bean.Test.main(Test.java:23)
解决方法
接口UserMapper的方法selectarticle与mybatis-config.xml里
与 下面UserMapper.xml里select id的要相同,当时写了大写
<select id="selectArticle" parameterType="int" resultMap="resultAticleList"> select users.id,users.name,users.age,article.id aid,article.title,article.content from users,article where users.id=article.userid and users.id=#{id} </select>
MyBatis笔记----报错:Exception in thread "main" org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)解决方法
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。