BindingException异常第一种解决办法

异常:

Exception in thread "main" org.apache.ibatis.binding.BindingException: Type interface com.aaa.pro.dao.DeptDao is not known to the MapperRegistry.
at org.apache.ibatis.binding.MapperRegistry.getMapper(MapperRegistry.java:47)
at org.apache.ibatis.session.Configuration.getMapper(Configuration.java:763)
at org.apache.ibatis.session.defaults.DefaultSqlSession.getMapper(DefaultSqlSession.java:291)
at com.aaa.pro.test.Main.query1(Main.java:40)
at com.aaa.pro.test.Main.main(Main.java:35)

运行截图截图;

 

解决办法:

把 <mapper namespace="com.aaa.pro.dao.DeptMapper">改为:

<mapper namespace="com.aaa.pro.dao.DeptDao">

 

 

posted @ 2019-07-03 14:26  DomiSong  阅读(8279)  评论(0)    收藏  举报