1. 程式人生 > >Spring Mybatis中的bug

Spring Mybatis中的bug

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)問題,即在mybatis中dao介面與mapper配置檔案在做對映繫結的時候出現問題,簡單說,就是介面與xml要麼是找不到,要麼是找到了卻匹配不到。

注意檢查: xml檔案中的配置屬性

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): cn.tedu.mybatis.mapper.UserMapper.deleteByUsername

一般來說是spring配置檔案中的SqlSessionFactoryBean配置有問題,請仔細檢視