mybatis访问报错:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

需要检查的步骤:

1.是否mapper.java文件上使用了注解@Mapper  或者 在启动类上扫描了Mapper类 @MapperScan("com.swapping.springcloud.ms.integral.mapper")   【注意扫描的包名是否正确】

2.注意mapper.xml文件中的namespace是否正确指向到Mapper.java类的位置 【<mapper namespace="com.swapping.springcloud.ms.integral.mapper.IntegralMapper">】

3.注意被调用的方法名在mapper.java中和mapper.xml中的id保持一致性

4.注意mapper.xml方法的parameterType尽量指定全路径的domain

5.注意Mapper.java在被调用的地方需要注入@Autowired

6.注意在配置文件properties中指明mapper.xml文件所在的位置

#mybatis
mybatis.mapper-locations=classpath:mapper/*.xml
#mybatis指定entity位置
mybatis.type-aliases-package=com.swapping.springcloud.ms.integral.domain

7.最终,一定一定要注意你建立的mapper.xml是xml文件,因为你创建的file在idea上默认会被识别为xml文件的图标,即使你没有指明后缀!!!

【mybatis】mybatis访问报错:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 或者 feign被调用方使用的mybatis总报空指针异常java.lang.NullPointerException,而变量都没有问题的情况的更多相关文章

  1. maven 项目报错org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)解决

    idea在使用maven构建的项目中使用mybatis时报错org.apache.ibatis.binding.BindingException: Invalid bound statement (n ...

  2. mybatis plus 报错 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

    org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 少了个范型

  3. maven项目 报错 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):

    ssm的项目如果在mapper.xml  mapper接口 配置没问题的情况下  项目依然报org.apache.ibatis.binding.BindingException: Invalid bo ...

  4. 项目启动报错org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.wuhongyu.mapper.OrdersMapper.selectByExample

    在用maven配置mybatis环境时出现此BindingExceptiony异常,发现在classes文件下没有mapper配置文件,应该是maven项目没有扫描到mapper包下的xml文件, 在 ...

  5. Maven项目使用mybatis报错 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):

    maven项目使用mybatis时,找不到mapper文件(.xml) 错误信息提示: 项目可以正常运行,但是在有请求到达服务器时(有访问数据库的请求),会出现报错!! 错误原因: mybatis没有 ...

  6. Srping mvc mabatis 报错 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):

    我的Mapper采用接口+注解的方式注入 @Repository(value="customerServOutCallMapper")public interface Custom ...

  7. Mybatis中的Caused by: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): 找不到Mapper.xml文件的问题

    1 首先在配置mapper-locations的时候: classpath:  只在现有目录下寻找配置文件 classpath*: 在现有的项目目录下和依赖的jar包下寻找xml配置文件

  8. 解决org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)...

    在IDEA中将xxxMapper.xml文件创建在(src/main/java)目录中,运行报错:org.apache.ibatis.binding.BindingException: Invalid ...

  9. mybatis使用时org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):的错误

    最近在使用mybatis时,出现了 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): 这 ...

随机推荐

  1. CentOS系统yum源配置修改、yum安装软件包源码包出错解决办法apt.sw.be couldn't connect to host

    yum安装包时报错: Could not retrieve mirrorlist http://mirrorlist.repoforge.org/el6/mirrors-rpmforge error  ...

  2. 系统日志查看logrotate 工具

    logrotate是作为linux系统日志的管理工具存在.他可以轮换,压缩,邮件系统日志文件. 默认的logrotate被加入cron的/etc/cron.daily中作为每日任务执行./etc/lo ...

  3. csu 最优对称路径(bfs+记忆化搜索)

    1106: 最优对称路径 Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 371  Solved: 77[Submit][Status][Web Boar ...

  4. git团队开发

    用git有一年了,下面是我这一年来的git使用总结,覆盖了日常使用中绝大多数的场景.嗯,至少是够用一年了,整理出来分享给大家,不明白的地方可以回复交流. git设置关闭自动换行 git config ...

  5. 程序员必备的代码审查(Code Review)清单

    在我们关于高效代码审查的博文中,我们建议使用一个检查清单.在代码审查中,检查清单是一个非常好的工具——它们保证了审查可以在你的团队中始终如一的进行.它们也是一种保证常见问题能够被发现并被解决的便利方式 ...

  6. JavaScript最全编码规范

    转载: JavaScript最全编码规范 类型 ●基本类型:访问基本类型时,应该直接操作类型值 ●string ●number ●boolean ●null ●undefined var foo = ...

  7. JAVA编程思想读书笔记(五)--多线程

    接上篇JAVA编程思想读书笔记(四)--对象的克隆 No1: daemon Thread(守护线程) 参考http://blog.csdn.net/pony_maggie/article/detail ...

  8. 454. 四数相加 II

    给定四个包含整数的数组列表 A , B , C , D ,计算有多少个元组 (i, j, k, l) ,使得 A[i] + B[j] + C[k] + D[l] = 0. 为了使问题简单化,所有的 A ...

  9. 在Azure中创建asp.net core 应用

    0.前言 在玩转Azure之前首先大家要有Azure账号,或者可以先申请一下微软的账号,然后进行与Azure的关联(azure账号是免费的).但是关联的步骤还是很有意思的,他需要VISA国际信用卡(我 ...

  10. Unity Shader 之 渲染流水线

    Unity Shader 之渲染流水线 什么是渲染流水线 一个渲染流程分成3个步骤: 应用阶段(Application stage) 几何阶段(Geometry stage) 光栅化阶段(Raster ...