使用Mybatis报错“Type interface com.test.mapper.UserMapper is not known to the MapperRegistry.“
UserMapper mapper = MybatisUtil.getSqlSession().getMapper(UserMapper.class);
System.out.println(mapper);
使用Mybatis报错“Type interface com.test.mapper.UserMapper is not known to the MapperRegistry.“
<mapper resource="com/yh/dao/UserMapper.xml"/>
要保证mapper.xml
和接口UserMapper的类全路径名,保持一致。
还没有评论,来说两句吧...