Mybatis:Cannot find class: Dept

遇到的问题:在mybatis中使用Association处理多对一映射关系时,运行报错:Cannot find class: Dept,以下是问题详情
问题代码

<resultMap id="EmpAndDeptResultMap" type="Emp">
        <id column="emp_id" property="empId"></id>
        <result column="emp_name" property="empName"></result>
        <result column="age" property="age"></result>
        <result column="gender" property="gender"></result>

<!--此处为问题代码-->
        <association property="dept" javaType="Dept">
            <id column="dept_id" property="dept.deptId"></id>
            <result column="dept_name" property="dept.deptName"></result>
        </association>
</resultMap>

<select id="getEmpAndDeptByEmpId" resultMap="EmpAndDeptResultMap">
        select t_emp.*, t_dept.*
        from t_emp
                 left join t_dept on t_emp.dept_id = t_dept.dept_id
        where t_emp.emp_id = #{empId}
 </select>

附上项目结构等

img


实体类Emp

img


实体类Dept

img


数据库

img


表t_dept

img


表t_emp

img


参考视频https://www.gulixueyuan.com/course/542/task/24745/show#

听评论区的建议:修改为: javaType="com.dyf.mybatis.pojo.Dept"后

img

Dept加上包路径就好了

没有找到一个类