mybatis传参类型

2024-11-02 06:14:25

1、导入mybatis的架包,sqlmapconfig配置文件,数据库访问的参数,以及架包

mybatis传参类型

3、创建实体类public class Dept {private Integer deptno;private String d髫潋啜缅eptname;public Integer getDeptno() {return deptno;}public void setDeptno(Integer deptno) {this.deptno = deptno;}public String getDeptname() {return deptname;}public void setDeptname(String deptname) {this.deptname = deptname;}@Overridepublic String toString() {return "Dept [deptno=" + deptno + ", deptname=" + deptname + "]";}}

mybatis传参类型

5、创建接口,访问数据持久层public interface DeptMapper {public List<Dept> findAll();}

mybatis传参类型
猜你喜欢