一对多 多对一 框架练习 代码如下:
导入的包:

配置文件和主配置文件


实体类:classes student teacher



导入的工具包,方便mbatis连接

在dao包下的映射文件和接口
classes:


student:


teacher:


最后的测试类:

完成!
一对多 多对一 框架练习 代码如下:
导入的包:

配置文件和主配置文件


实体类:classes student teacher



导入的工具包,方便mbatis连接

在dao包下的映射文件和接口
classes:


student:


teacher:


最后的测试类:

完成!