当前位置:Gxl网 > APP开发 > Type interface com.innovationV2.mapper.UserMapper is not known to the MapperRegistry

Type interface com.innovationV2.mapper.UserMapper is not known to the MapperRegistry

时间:2021-07-01 10:21:17 帮助过:8人阅读

1.mybatis设置文件未添加mapper

在mybatis文件中添加
<mappers>
  <mapper resource="com/innovationV2/mapper/UserMapper.xml"/>
</mappers>

2.mapper文件的命名空间设置错误

mapper文件内的namespace需和路径一致
<mapper namespace="com.cskaoyan.StuMapper">