Update StudentMapper.java

main
pveayojnc 4 months ago
parent 3f44fd811a
commit 120cd80c33

@ -1,9 +1,19 @@
package com.zsz.mapper;
// 导入 MyBatis-Plus 提供的基础 Mapper 接口,它包含了常用的数据库 CRUD 操作方法
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
// 导入学生实体类,该类用于封装学生的相关属性,与数据库中的学生表对应
import com.zsz.pojo.Student;
// 导入 Spring 框架的注解,将该接口标记为数据访问层组件,使其能被 Spring 容器管理
import org.springframework.stereotype.Repository;
/**
* 访 MyBatis-Plus BaseMapper
*/
@Repository
// 定义学生 Mapper 接口,通过泛型指定操作的实体类型为 Student
public interface StudentMapper extends BaseMapper<Student> {
}
// 因为继承了 BaseMapper 接口,所以该接口默认拥有对 Student 实体的基本数据库操作功能,
// 例如插入、更新、删除、查询等操作。
// 如果需要实现一些特殊的数据库操作,可以在该接口中自定义方法。
}
Loading…
Cancel
Save