Type interface com.ssm.mapper.NewProductMapper is not known to the MapperRegistry.

报错:

Exception in thread "main" org.apache.ibatis.binding.BindingException: Type interface com.ssm.mapper.NewProductMapper 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:745)
at org.apache.ibatis.session.defaults.DefaultSqlSession.getMapper(DefaultSqlSession.java:292)
at com.ssm.test.Test.main(Test.java:105)

原因是 mybatis-cofig.xml文件中没有 配置 NewProductMapper.xml文件

Type interface com.ssm.mapper.NewProductMapper is not known to the MapperRegistry.

 

 

上一篇:Spring整合Ibatis之SqlMapClientDaoSupport


下一篇:1、mybatis入门