student表: teacher表: 多对一 多个学生关联一个老师 Student类: Teacher类: 查询方法: List<Student> queryAll(); 具体处理: 效果: 一对多 一个老师教多个学生(集合) Student类: Teacher类: 查询方法: //获取指定老师下的所有学生及老师的信息 Teacher getTeacher(@Param("id") int id); 具体处理: 效果: