mybatis之简单分布查询

这篇博客详细介绍了如何在MyBatis中进行简单的分布式查询,包括涉及的表结构、实体类、接口定义、映射文件的配置,以及如何获取SqlSession连接。特别指出,当column标签内容与下一张表接口查询条件不一致时,可能会导致查询结果不完整。同时,博主还提到了log4j.xml、mybatis-config.xml和pom.xml的相关配置作为示例。
摘要由CSDN通过智能技术生成

1.表

 2.实体类

(1)student类

package com.sunyu.pojo;

import java.util.Objects;

public class Student {
    private Integer studentId;
    private String studentName;
    private Integer studentAge;
    private Integer math;
    private Integer chinese;
    private Integer english;
    private Clazz clazz;
//    private String studentScore;
    public Student(){

    }

    public Student(Integer studentId, String studentName, Integer studentAge, Integer math, Integer chinese, Integer english ,String studentScore) {
        this.studentId = studentId;
        this.studentName = studentName;
        this.studentAge = studentAge;
        this.math = math;
        this.chinese = chinese;
        this.english = english;
//        this.studentScore=studentScore;
    }

    public Clazz getClazz() {
        return clazz;
    }

    public void setClazz(Clazz clazz) {
        this.clazz = clazz;
    }
//
//    public String getStudentScore() {
//        return studentScore;
//    }
//
//    public void setStudentScore(String studentScore) {
//        this.studentScore = studentScore;
//    }

    public Integer getStudentId() {
        return studentId;
    }

    public void setStudentId(Integer studentId) {
        this.studentId = studentId;
    }

    public String getStudentName() {
        return studentName;
    }

    public void setStudentName(String studentName) {
        this.studentName = studentName;
    }

    public Integer getStudentAge() {
        return studentAge;
    }

    public void setStudentAge(Integer studentAge) {
        this.studentAge = studentAge;
    }

    public Integer getMath() {
        ret
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值