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

it2022-05-09  23

dao层不进入实现类,因为orm-context.xml配置文件中

扫描的是接口而不是xml配置文件,修改为

搞定!也就是说mybatis只接管数据库管理,即只扫描mybatis的xml文件,接口和实现类一律由spring管理,

 

因此上图中的namespace不可以是接口名,如果是接口名,mybatis就会忽略实现类,根据接口中的方法扫描sql配置文件。

 

转载于:https://www.cnblogs.com/xiaopu123/p/7506835.html


最新回复(0)