在一切准备就绪之后,测试test,却出现了org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):

 

这个问题,通常情况下,这是xml文件与接口mapper不对应导致的.  但我仔细检查了一遍,没有发现错误.

在查阅过相关资料后发现,IDEA对xml文件处理的方式不同. mapper.xml文件需要放置在resource这个文件夹下.

而eclipse只要mapper接口文件与mapper.xml放置在同一平级目录就行

posted on 2017-12-02 14:52  Sharpest  阅读(3474)  评论(0编辑  收藏  举报