以接口的方式编程报错

Exception in thread "main" org.apache.ibatis.binding.BindingException: Type interface com.yihaomen.mybatis.inter.IUserOperation is not known to the MapperRegistry.
at org.apache.ibatis.binding.MapperRegistry.getMapper(MapperRegistry.java:21)
at org.apache.ibatis.session.Configuration.getMapper(Configuration.java:381)
at org.apache.ibatis.session.defaults.DefaultSqlSession.getMapper(DefaultSqlSession.java:180)
at com.yihaomen.test.Test.main(Test.java:33)

原因:User.xml 文件中 mapper中:错误如下红色字体为错误命名空间,接口编程中应对应接口所在路径 ,绿色为正确配置。

参考
http://blog.sina.com.cn/s/blog_83e08e690101j3ba.html

这里面有解决方案。http://www.iteye.com/problems/51369