报错log:org.apache.ibatis.binding.BindingException: Type interface com.trf.dao.UserDao is not known to the MapperRegistry.
使用mybatis时经常会遇见,原因是,我们未在mybatis-config.xml文件中注册dao层中相关的Mapper.xml文件,导致UserDao无法获知映射器的注册。
解决办法:
在mybatis-config.xml文件中注册相关的Mapper.xml文件。